''"})} * ) * * @ORM\Entity */ class CalendarRange implements TrackCreationInterface, TrackUpdateInterface { use RemoteCalendarTrait; use TrackCreationTrait; use TrackUpdateTrait; /** * @ORM\OneToOne(targetEntity=Calendar::class, mappedBy="calendarRange") */ private ?Calendar $calendar = null; /** * @ORM\Column(type="datetime_immutable", nullable=false) * * @Groups({"read", "write", "calendar:read"}) * * @Assert\NotNull */ private ?\DateTimeImmutable $endDate = null; /** * @ORM\Id * * @ORM\GeneratedValue * * @ORM\Column(type="integer") * * @Groups({"read"}) */ private ?int $id = null; /** * @ORM\ManyToOne(targetEntity=Location::class) * * @ORM\JoinColumn(nullable=false) * * @Groups({"read", "write", "calendar:read"}) * * @Assert\NotNull */ private ?Location $location = null; /** * @ORM\Column(type="datetime_immutable", nullable=false) * * @groups({"read", "write", "calendar:read"}) * * @Assert\NotNull */ private ?\DateTimeImmutable $startDate = null; /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User") * * @Groups({"read", "write", "calendar:read"}) * * @Assert\NotNull */ private ?User $user = null; public function getCalendar(): ?Calendar { return $this->calendar; } public function getEndDate(): ?\DateTimeImmutable { return $this->endDate; } public function getId(): ?int { return $this->id; } public function getLocation(): ?Location { return $this->location; } public function getStartDate(): ?\DateTimeImmutable { return $this->startDate; } public function getUser(): ?User { return $this->user; } /** * @internal use {@link (Calendar::setCalendarRange)} instead */ public function setCalendar(?Calendar $calendar): void { $this->calendar = $calendar; } public function setEndDate(\DateTimeImmutable $endDate): self { $this->endDate = $endDate; return $this; } public function setLocation(?Location $location): self { $this->location = $location; return $this; } public function setStartDate(\DateTimeImmutable $startDate): self { $this->startDate = $startDate; return $this; } public function setUser(?User $user): self { $this->user = $user; return $this; } }