| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263 |
- <?php
- namespace AppBundle\Entity\Booking;
- use AppBundle\Entity\AccessAndFunction\Access;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Symfony\Component\Serializer\Annotation\Groups;
- use AppBundle\Entity\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- use Symfony\Component\Validator\Constraints as Assert;
- /**
- *
- * Participation d'un Access à un Event
- *
- * @Iri("http://schema.org/EventUser")
- */
- #[ORM\Entity]
- #[ORM\Table]
- #[ORM\Index(name: 'participation', columns: ['participation'])]
- #[ORM\Index(name: 'datetimeStart', columns: ['datetimeStart'])]
- class EventUser
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['eventuser', 'presence_attendance', 'event_details'])]
- private $id;
- /**
- * @var Event
- */
- #[ORM\ManyToOne(targetEntity: 'Event', inversedBy: 'eventUser')]
- #[Groups(['eventuser', 'invitations_list'])]
- private $event;
- /**
- * @var Access
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'eventUsers')]
- #[Groups(['eventuser', 'presence_attendance_eventuser', 'event_details_eventuserfiltered', 'invitations_list', 'event_details_eventuser'])]
- private $guest;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\ParticipationStatusEnum', 'toArray'])]
- #[Groups(['eventuser', 'invitations_list', 'event_details_eventuser'])]
- private $participation;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', options: ['default' => 'READY'])]
- #[Assert\Type(type: 'string')]
- #[Assert\NotNull]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Message\MessageStatusEnum', 'toArray'])]
- #[Groups(['eventuser'])]
- private $statusMail = "READY";
- /**
- * @var \DateTime
- */
- #[ORM\Column(type: 'datetime')]
- #[Assert\DateTime]
- #[Assert\NotNull]
- #[Groups(['eventuser', 'invitations_list', 'presence_attendance_eventuser', 'event_details_eventuser'])]
- private $datetimeStart;
- /**
- * @var \DateTime
- */
- #[ORM\Column(type: 'datetime', nullable: true)]
- #[Assert\DateTime]
- #[Groups(['eventuser', 'invitations_list'])]
- private $datetimeEnd;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['eventuser'])]
- private $attendance = false;
- /**
- * Sets id.
- *
- * @param int $id
- *
- * @return $this
- */
- public function setId($id)
- {
- $this->id = $id;
- return $this;
- }
- /**
- * Gets id.
- *
- * @return int
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Sets event.
- *
- * @param Event $event
- *
- * @return $this
- */
- public function setEvent(Event $event = null)
- {
- $this->event = $event;
- return $this;
- }
- /**
- * Gets event.
- *
- * @return Event
- */
- public function getEvent()
- {
- return $this->event;
- }
- /**
- * Sets guest.
- *
- * @param Access $guest
- *
- * @return $this
- */
- public function setGuest(Access $guest = null)
- {
- $this->guest = $guest;
- return $this;
- }
- /**
- * Gets guest.
- *
- * @return Access
- */
- public function getGuest()
- {
- return $this->guest;
- }
- /**
- * Sets participation.
- *
- * @param string $participation
- *
- * @return $this
- */
- public function setParticipation($participation)
- {
- $this->participation = $participation;
- return $this;
- }
- /**
- * Gets participation.
- *
- * @return string
- */
- public function getParticipation()
- {
- return $this->participation;
- }
- /**
- * Sets datetimeStart.
- *
- * @param \DateTime $datetimeStart
- *
- * @return $this
- */
- public function setDatetimeStart(\DateTime $datetimeStart)
- {
- $this->datetimeStart = $datetimeStart;
- return $this;
- }
- /**
- * Gets datetimeStart.
- *
- * @return \DateTime
- */
- public function getDatetimeStart()
- {
- return $this->datetimeStart;
- }
- /**
- * Sets datetimeEnd.
- *
- * @param \DateTime $datetimeEnd
- *
- * @return $this
- */
- public function setDatetimeEnd(\DateTime $datetimeEnd)
- {
- $this->datetimeEnd = $datetimeEnd;
- return $this;
- }
- /**
- * Gets datetimeEnd.
- *
- * @return \DateTime
- */
- public function getDatetimeEnd()
- {
- return $this->datetimeEnd;
- }
- /**
- * Sets attendance.
- *
- * @param bool $attendance
- *
- * @return $this
- */
- public function setAttendance($attendance)
- {
- $this->attendance = $attendance;
- return $this;
- }
- /**
- * Gets attendance.
- *
- * @return bool
- */
- public function getAttendance()
- {
- return $this->attendance;
- }
- /**
- * Sets statusMail.
- *
- * @param string $statusMail
- *
- * @return $this
- */
- public function setStatusMail($statusMail)
- {
- $this->statusMail = $statusMail;
- return $this;
- }
- /**
- * Gets statusMail.
- *
- * @return string
- */
- public function getStatusMail()
- {
- return $this->statusMail;
- }
- }
|