rdv: set the calendar ranges as an API point + fetch them into the calendar view

This commit is contained in:
nobohan
2021-08-16 19:22:29 +02:00
parent 323434f34e
commit 02a9e21f62
4 changed files with 144 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ namespace Chill\CalendarBundle\Entity;
use Chill\CalendarBundle\Repository\CalendarRangeRepository;
use Chill\MainBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Table(name="chill_calendar.calendar_range")
@@ -16,21 +17,25 @@ class CalendarRange
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @groups({"read"})
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
* @groups({"read"})
*/
private User $user;
/**
* @ORM\Column(type="datetimetz_immutable")
* @groups({"read"})
*/
private \DateTimeImmutable $startDate;
/**
* @ORM\Column(type="datetimetz_immutable")
* @groups({"read"})
*/
private \DateTimeImmutable $endDate;