calendar app: change mainUser if mainUser is selected

This commit is contained in:
2022-05-23 17:57:12 +02:00
parent 7dcd5be735
commit 3fbdcdc431
6 changed files with 53 additions and 34 deletions

View File

@@ -19,6 +19,7 @@ use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Chill\MainBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
use LogicException;
use Symfony\Component\Serializer\Annotation as Serializer;
/**
* @ORM\Table(name="chill_calendar.invite")
@@ -47,17 +48,20 @@ class Invite implements TrackUpdateInterface, TrackCreationInterface
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Serializer\Groups(groups={"calendar:read", "read"})
*/
private ?int $id = null;
/**
* @ORM\Column(type="text", nullable=false, options={"default": "pending"})
* @Serializer\Groups(groups={"calendar:read", "read"})
*/
private string $status = self::PENDING;
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
* @ORM\JoinColumn(nullable=false)
* @Serializer\Groups(groups={"calendar:read", "read"})
*/
private ?User $user = null;