| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- <?php
- namespace AppBundle\Entity\Billing;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Symfony\Component\Serializer\Annotation\Groups;
- use Symfony\Component\Validator\Constraints as Assert;
- use AppBundle\Entity\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- /**
- * Période associée à une facture
- * (Ex: Deuxième trimestre 2020)
- *
- * @Iri("http://schema.org/BillPeriod")
- */
- #[ORM\Entity]
- class BillPeriod
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['billperiod', 'billaccounting_list', 'bill_list', 'billcredit_list', 'advancepayment_list', 'build_bills', 'billcredit_list', 'advancepayment_list'])]
- private $id;
- /**
- * @var
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PeriodicityEnum', 'toArray'])]
- #[Groups(['billperiod', 'billaccounting_list_billperiod', 'bill_list_billperiod', 'billcredit_list_billperiod', 'build_bills_billperiod'])]
- private $periodicity;
- /**
- * @var string
- *
- *
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['billperiod', 'billaccounting_list_billperiod', 'bill_list_billperiod', 'billpayment_list_bill', 'billcredit_list_billperiod', 'advancepayment_list_billperiod', 'build_bills_billperiod', 'billcredit_list_billperiod', 'advancepayment_list_billperiod'])]
- private $schoolYear;
- /**
- * @var \DateTime
- *
- * @Iri("https://schema.org/detailDateStart")
- */
- #[ORM\Column(type: 'date', nullable: true)]
- #[Assert\Date]
- #[Groups(['billperiod', 'build_bills_billperiod'])]
- private $detailDateStart;
- /**
- * @var \DateTime
- *
- * @Iri("https://schema.org/detailDateEnd")
- */
- #[ORM\Column(type: 'date', nullable: true)]
- #[Assert\Date]
- #[Groups(['billperiod'])]
- private $detailDateEnd;
- /**
- * @var
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PeriodEnum', 'toArray'])]
- #[Groups(['billperiod', 'billaccounting_list_billperiod', 'bill_list_billperiod', 'billpayment_list_bill', 'billcredit_list_billperiod', 'build_bills_billperiod'])]
- private $detailLabel;
- /**
- * @var \DateTime
- */
- #[ORM\Column(type: 'date', nullable: true)]
- #[Assert\Date]
- #[Groups(['billperiod', 'build_bills_billperiod'])]
- private $uniqDate;
- /**
- * Constructor
- */
- public function __construct()
- {
- }
- /**
- * 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 periodicity
- *
- * @param string $periodicity
- *
- * @return BillPeriod
- */
- public function setPeriodicity($periodicity)
- {
- $this->periodicity = $periodicity;
- return $this;
- }
- /**
- * Get periodicity
- *
- * @return string
- */
- public function getPeriodicity()
- {
- return $this->periodicity;
- }
- /**
- * Set schoolYear
- *
- * @param string $schoolYear
- *
- * @return BillPeriod
- */
- public function setSchoolYear($schoolYear)
- {
- $this->schoolYear = $schoolYear;
- return $this;
- }
- /**
- * Get schoolYear
- *
- * @return string
- */
- public function getSchoolYear()
- {
- return $this->schoolYear;
- }
- /**
- * Set detailDateStart
- *
- * @param \DateTime $detailDateStart
- *
- * @return BillPeriod
- */
- public function setDetailDateStart($detailDateStart)
- {
- $this->detailDateStart = $detailDateStart;
- return $this;
- }
- /**
- * Get detailDateStart
- *
- * @return \DateTime
- */
- public function getDetailDateStart()
- {
- return $this->detailDateStart ? $this->detailDateStart->format('Y-m-d') : $this->detailDateStart;
- }
- /**
- * Set detailDateEnd
- *
- * @param \DateTime $detailDateEnd
- *
- * @return BillPeriod
- */
- public function setDetailDateEnd($detailDateEnd)
- {
- $this->detailDateEnd = $detailDateEnd;
- return $this;
- }
- /**
- * Get detailDateEnd
- *
- * @return \DateTime
- */
- public function getDetailDateEnd()
- {
- return $this->detailDateEnd ? $this->detailDateEnd->format('Y-m-d') : $this->detailDateEnd;
- }
- /**
- * Set uniqDate
- *
- * @param \DateTime $uniqDate
- *
- * @return BillPeriod
- */
- public function setUniqDate($uniqDate)
- {
- $this->uniqDate = $uniqDate;
- return $this;
- }
- /**
- * Get uniqDate
- *
- * @return \DateTime
- */
- public function getUniqDate()
- {
- return $this->uniqDate ? $this->uniqDate->format('Y-m-d') : $this->uniqDate;
- }
- /**
- * Set detailLabel
- *
- * @param string $detailLabel
- *
- * @return BillPeriod
- */
- public function setDetailLabel($detailLabel)
- {
- $this->detailLabel = $detailLabel;
- return $this;
- }
- /**
- * Get detailLabel
- *
- * @return string
- */
- public function getDetailLabel()
- {
- return $this->detailLabel;
- }
- }
|