Add a mention on next calendars on search results

This commit is contained in:
2022-07-01 18:01:42 +02:00
parent 3dcec5d44a
commit 8bbd3b01d9
7 changed files with 79 additions and 6 deletions

View File

@@ -84,7 +84,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface
public ?User $previousMainUser = null;
/**
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod")
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod", inversedBy="calendars")
* @Serializer\Groups({"read"})
*/
private AccompanyingPeriod $accompanyingPeriod;
@@ -153,7 +153,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface
private ?User $mainUser = null;
/**
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\Person")
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\Person", inversedBy="calendars")
* @ORM\JoinTable(name="chill_calendar.calendar_to_persons")
* @Serializer\Groups({"calendar:read", "read"})
* @Assert\Count(min=1, minMessage="calendar.At least {{ limit }} person is required.")