2021-08-18 21:09:06 +02:00

82 lines
1.5 KiB
PHP

<?php
namespace Chill\CalendarBundle\Entity;
use Chill\CalendarBundle\Repository\CalendarRangeRepository;
use Chill\MainBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="chill_calendar.calendar_range")
* @ORM\Entity(repositoryClass=CalendarRangeRepository::class)
*/
class CalendarRange
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
*/
private User $user;
/**
* @ORM\Column(type="date_immutable")
*/
private \DateTimeImmutable $startDate;
/**
* @ORM\Column(type="date_immutable")
*/
private \DateTimeImmutable $endDate;
//TODO Lieu
public function getId(): ?int
{
return $this->id;
}
public function getStartDate(): ?\DateTimeImmutable
{
return $this->startDate;
}
public function setStartDate(\DateTimeImmutable $startDate): self
{
$this->startDate = $startDate;
return $this;
}
public function getEndDate(): ?\DateTimeImmutable
{
return $this->endDate;
}
public function setEndDate(\DateTimeImmutable $endDate): self
{
$this->endDate = $endDate;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
}