<?phpnamespace App\Entity;use App\Repository\CalendrierRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: CalendrierRepository::class)]class Calendrier{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $titre = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $start = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $end = null; #[ORM\Column(type: Types::TEXT)] private ?string $description = null; #[ORM\Column] private ?bool $all_day = null; #[ORM\Column(length: 7)] private ?string $background_color = null; #[ORM\Column(length: 7)] private ?string $border_color = null; #[ORM\Column(length: 7)] private ?string $text_color = null; #[ORM\OneToMany(mappedBy: 'calendrier', targetEntity: JobCard::class)] private Collection $jobCards; public function __construct() { $this->jobCards = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getTitre(): ?string { return $this->titre; } public function setTitre(string $titre): static { $this->titre = $titre; return $this; } public function getStart(): ?\DateTimeInterface { return $this->start; } public function setStart(\DateTimeInterface $start): static { $this->start = $start; return $this; } public function getEnd(): ?\DateTimeInterface { return $this->end; } public function setEnd(\DateTimeInterface $end): static { $this->end = $end; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): static { $this->description = $description; return $this; } public function isAllDay(): ?bool { return $this->all_day; } public function setAllDay(bool $all_day): static { $this->all_day = $all_day; return $this; } public function getBackgroundColor(): ?string { return $this->background_color; } public function setBackgroundColor(string $background_color): static { $this->background_color = $background_color; return $this; } public function getBorderColor(): ?string { return $this->border_color; } public function setBorderColor(string $border_color): static { $this->border_color = $border_color; return $this; } public function getTextColor(): ?string { return $this->text_color; } public function setTextColor(string $text_color): static { $this->text_color = $text_color; return $this; } /** * @return Collection<int, JobCard> */ public function getJobCards(): Collection { return $this->jobCards; } public function addJobCard(JobCard $jobCard): static { if (!$this->jobCards->contains($jobCard)) { $this->jobCards->add($jobCard); $jobCard->setCalendrier($this); } return $this; } public function removeJobCard(JobCard $jobCard): static { if ($this->jobCards->removeElement($jobCard)) { // set the owning side to null (unless already changed) if ($jobCard->getCalendrier() === $this) { $jobCard->setCalendrier(null); } } return $this; }}