*/ #[ORM\OneToMany(targetEntity: 'Bill', mappedBy: 'pes', cascade: ['persist'], orphanRemoval: true)] #[Groups(['pes_bills'])] private $bills; /** * @var string */ #[ORM\Column(type: 'string', nullable: true)] #[Assert\Type(type: 'string')] #[Groups(['pes', 'pes_list', 'billaccounting_list_pes'])] private $roleNumber; /** * @var \DateTime */ #[ORM\Column(type: 'date', nullable: true)] #[Assert\Date] #[Groups(['pes', 'pes_list'])] private $date; /** * @var File */ #[Assert\Valid] #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')] #[ORM\JoinColumn(nullable: true)] #[Groups(['pes', 'pes_list'])] private $file; /** * @var \DateTime */ #[ORM\Column(type: 'date', nullable: true)] #[Assert\Date] #[Groups(['pes', 'pes_list'])] private $samplingDate; /** * @var bool */ #[ORM\Column(type: 'boolean', options: ['default' => false])] #[Assert\Type(type: 'boolean')] #[Groups(['pes', 'pes_list'])] #[Assert\NotNull] private $withSampling = false; /** * The constructor */ public function __construct() { $this->bills = new ArrayCollection(); } /** * 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; } /** * Set roleNumber * * @param string $roleNumber * * @return Pes */ public function setRoleNumber($roleNumber) { $this->roleNumber = $roleNumber; return $this; } /** * Get roleNumber * * @return string */ public function getRoleNumber() { return $this->roleNumber; } /** * Set date * * @param \DateTime $date * * @return Pes */ public function setDate($date) { $this->date = $date; return $this; } /** * Get date * * @return \DateTime */ public function getDate() { return $this->date; } /** * Set file * * @param \AppBundle\Entity\Core\File $file * * @return Pes */ public function setFile(\AppBundle\Entity\Core\File $file = null) { $this->file = $file; return $this; } /** * Get file * * @return \AppBundle\Entity\Core\File */ public function getFile() { return $this->file; } /** * Add bill * * @param \AppBundle\Entity\Billing\Bill $bill * * @return Pes */ public function addBill(\AppBundle\Entity\Billing\Bill $bill) { $this->bills[] = $bill; return $this; } /** * Remove bill * * @param \AppBundle\Entity\Billing\Bill $bill */ public function removeBill(\AppBundle\Entity\Billing\Bill $bill) { $this->bills->removeElement($bill); } /** * Get bills * * @return \Doctrine\Common\Collections\Collection */ public function getBills() { return $this->bills; } /** * Set samplingDate * * @param \DateTime $samplingDate * * @return Pes */ public function setSamplingDate($samplingDate) { $this->samplingDate = $samplingDate; return $this; } /** * Get samplingDate * * @return \DateTime */ public function getSamplingDate() { return $this->samplingDate; } /** * Set withSampling * * @param boolean $withSampling * * @return Pes */ public function setWithSampling($withSampling) { $this->withSampling = $withSampling; return $this; } /** * Get withSampling * * @return boolean */ public function getWithSampling() { return $this->withSampling; } }