mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
rdv: available calendar ranges
This commit is contained in:
@@ -116,7 +116,7 @@ class Calendar
|
||||
private ?CancelReason $cancelReason = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="CalendarRange")
|
||||
* @ORM\ManyToOne(targetEntity="CalendarRange", inversedBy="calendars")
|
||||
*/
|
||||
private ?CalendarRange $calendarRange = null;
|
||||
|
||||
|
@@ -4,6 +4,8 @@ namespace Chill\CalendarBundle\Entity;
|
||||
|
||||
use Chill\CalendarBundle\Repository\CalendarRangeRepository;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
|
||||
@@ -23,7 +25,7 @@ class CalendarRange
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
|
||||
* @groups({"read"})
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private User $user;
|
||||
|
||||
@@ -39,8 +41,19 @@ class CalendarRange
|
||||
*/
|
||||
private \DateTimeImmutable $endDate;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity=Calendar::class,
|
||||
* mappedBy="calendarRange")
|
||||
*/
|
||||
private Collection $calendars;
|
||||
|
||||
//TODO Lieu
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->calendars = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
|
Reference in New Issue
Block a user