*/ #[Assert\Valid] #[ORM\OneToMany(targetEntity: 'PersonHolidayRecur', mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)] #[Groups(['personholiday_bookingrecur', 'accessholidays_list'])] protected $eventRecur; /** * @var Access */ #[ORM\ManyToOne(targetEntity: '\AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'holidays')] #[Groups(['personholiday', 'accessholidays_list'])] private $access; /** * @var bool */ #[ORM\Column(type: 'boolean', options: ['default' => false])] #[Assert\Type(type: 'boolean')] #[Assert\NotNull] #[Groups(['personholiday'])] private $approval = false; /** * @var int */ #[ORM\Column(type: 'integer', nullable: true, options: ['default' => 0])] #[Assert\Type(type: 'integer', message: 'invalid-integer')] #[Groups(['personholiday'])] private $unpaidLeave; public function __construct() { parent::__construct(); $this->eventRecur = new ArrayCollection(); } /** * Sets access. * * @param Access $access * * @return $this */ public function setAccess(Access $access = null) { $this->access = $access; return $this; } /** * Gets access. * * @return Access */ public function getAccess() { return $this->access; } /** * Sets approval. * * @param bool $approval * * @return $this */ public function setApproval($approval) { $this->approval = $approval; return $this; } /** * Gets approval. * * @return bool */ public function getApproval() { return $this->approval; } /** * Sets unpaidLeave. * * @param int $unpaidLeave * * @return $this */ public function setUnpaidLeave($unpaidLeave) { $this->unpaidLeave = $unpaidLeave; return $this; } /** * Gets unpaidLeave. * * @return int */ public function getUnpaidLeave() { return $this->unpaidLeave; } }