| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- <?php
- namespace AppBundle\Entity\Billing;
- use AppBundle\Entity\Core\File;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Symfony\Component\Validator\Constraints as Assert;
- use AppBundle\Entity\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- use Doctrine\Common\Collections\ArrayCollection;
- use Symfony\Component\Serializer\Annotation\Groups;
- /**
- * Paramètres généraux d'un export Sdd regie
- *
- *
- * @Iri("http://schema.org/Jvs")
- */
- #[ORM\Entity(repositoryClass: 'AppBundle\Entity\Billing\Repository\SddRegieRepository')]
- class SddRegie
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['sddregie'])]
- private $id;
- /**
- * @var ArrayCollection<Bill>
- */
- #[ORM\OneToMany(targetEntity: 'Bill', mappedBy: 'sddRegie', orphanRemoval: true)]
- private $bills;
- /**
- * @var \DateTime
- */
- #[ORM\Column(type: 'date', nullable: true)]
- #[Assert\Date]
- #[Groups(['sddregie'])]
- private $date;
- /**
- * @var File
- */
- #[Assert\Valid]
- #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')]
- #[ORM\JoinColumn(nullable: true)]
- #[Groups(['sddregie'])]
- private $file;
- /**
- * @var File
- */
- #[Assert\Valid]
- #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')]
- #[ORM\JoinColumn(nullable: true)]
- #[Groups(['sddregie'])]
- private $bordereau;
- /**
- * @var \DateTime
- */
- #[ORM\Column(type: 'date', nullable: true)]
- #[Assert\Date]
- private $samplingDate;
- /**
- * 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 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 $bordereau
- *
- * @return \AppBundle\Entity\Core\File
- */
- public function getBordereau()
- {
- return $this->bordereau;
- }
- /**
- * Set $bordereau
- *
- * @param \AppBundle\Entity\Core\File $bordereau
- *
- * @return Pes
- */
- public function setBordereau(\AppBundle\Entity\Core\File $bordereau = null)
- {
- $this->bordereau = $bordereau;
- 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;
- }
- }
|