*/ #[ORM\OneToMany(targetEntity: 'Bill', mappedBy: 'ciril', cascade: ['persist'], orphanRemoval: true)] #[Groups(['ciril_bills'])] private $bills; /** * @var \DateTime */ #[ORM\Column(type: 'date', nullable: true)] #[Assert\Date] #[Groups(['ciril', 'ciril_list'])] private $date; /** * @var File */ #[Assert\Valid] #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')] #[ORM\JoinColumn(nullable: true)] #[Groups(['ciril', 'ciril_list'])] private $file; /** * 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 date * * @param \DateTime $date * * @return Ciril */ public function setDate($date) { $this->date = $date; return $this; } /** * Get date * * @return \DateTime */ public function getDate() { return $this->date; } /** * Add bill * * @param \AppBundle\Entity\Billing\Bill $bill * * @return Ciril */ 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 file * * @param \AppBundle\Entity\Core\File $file * * @return Ciril */ 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; } }