| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495 |
- <?php
- namespace AppBundle\Entity\Billing;
- use AppBundle\Entity\Organization\Organization;
- 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;
- use AppBundle\Annotation\DefaultField;
- /**
- * Paramètres globaux d'une Organization concernant la facturation liée à la location
- *
- * @Iri("http://schema.org/BillingSettingRent")
- */
- #[ORM\Entity]
- class BillingSettingRent
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['billingsettingrent'])]
- private $id;
- /**
- * @var BillingSetting
- */
- #[ORM\OneToOne(targetEntity: 'BillingSetting', inversedBy: 'billingSettingRent', fetch: 'EAGER')]
- #[ORM\JoinColumn(nullable: false)]
- #[Assert\NotNull]
- #[Groups(['billingsettingrent'])]
- private $billingSetting;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\ReductionTypeEnum', 'toArray'])]
- #[Groups(['billingsettingrent'])]
- private $reductionType;
- /**
- * @var float
- */
- #[ORM\Column(type: 'float', nullable: true)]
- #[Assert\Type(type: 'float')]
- #[Groups(['billingsettingrent'])]
- private $thresholdFirstAmount;
- /**
- * @var float
- */
- #[ORM\Column(type: 'float', nullable: true)]
- #[Assert\Type(type: 'float')]
- #[Groups(['billingsettingrent'])]
- private $thresholdSecondAmount;
- /**
- * @var float
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['billingsettingrent'])]
- private $thresholdNumberYear;
- /**
- * @var array
- */
- #[ORM\Column(type: 'json_array', nullable: true)]
- #[Groups(['billingsettingrent'])]
- private $instrumentFamilyReduction;
- /**
- * @var array
- */
- #[ORM\Column(type: 'json_array', nullable: true)]
- #[Groups(['billingsettingrent'])]
- private $purchaseDateReduction;
- /**
- * @var array
- */
- #[ORM\Column(type: 'json_array', nullable: true)]
- #[Groups(['billingsettingrent'])]
- private $purchaseAmountReduction;
- /**
- * @var array
- */
- #[ORM\Column(type: 'json_array', nullable: true)]
- #[Groups(['billingsettingrent'])]
- private $rentalYearsReduction;
- /**
- * @var array
- */
- #[ORM\Column(type: 'json_array', nullable: true)]
- #[Groups(['billingsettingrent'])]
- private $instrumentFamilyAndRentalYearsReduction;
- /**
- * @var float
- */
- #[ORM\Column(type: 'float', nullable: true)]
- #[Assert\Type(type: 'float')]
- #[Groups(['billingsettingrent'])]
- private $singleAmount;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PeriodicityEnum', 'toArray'])]
- #[Groups(['billingsettingrent'])]
- private $periodicity;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 7, nullable: true)]
- #[Assert\Length(max: 7, maxMessage: 'invalid-max-length')]
- #[Assert\Type(type: 'string')]
- #[Groups(['billingsettingrent'])]
- private $accountingCode;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['billingsettingrent'])]
- private $nature;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 200, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['billingsettingrent'])]
- private $accountingCodelabel;
- /**
- * 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 reductionType
- *
- * @param string $reductionType
- *
- * @return BillingSettingRent
- */
- public function setReductionType($reductionType)
- {
- $this->reductionType = $reductionType;
- return $this;
- }
- /**
- * Get reductionType
- *
- * @return string
- */
- public function getReductionType()
- {
- return $this->reductionType;
- }
- /**
- * Set instrumentFamilyReduction
- *
- * @param array $instrumentFamilyReduction
- *
- * @return BillingSettingRent
- */
- public function setInstrumentFamilyReduction($instrumentFamilyReduction)
- {
- $this->instrumentFamilyReduction = $instrumentFamilyReduction;
- return $this;
- }
- /**
- * Get instrumentFamilyReduction
- *
- * @return array
- */
- public function getInstrumentFamilyReduction()
- {
- return $this->instrumentFamilyReduction;
- }
- /**
- * Set purchaseDateReduction
- *
- * @param array $purchaseDateReduction
- *
- * @return BillingSettingRent
- */
- public function setPurchaseDateReduction($purchaseDateReduction)
- {
- $this->purchaseDateReduction = $purchaseDateReduction;
- return $this;
- }
- /**
- * Get purchaseDateReduction
- *
- * @return array
- */
- public function getPurchaseDateReduction()
- {
- return $this->purchaseDateReduction;
- }
- /**
- * Set purchaseAmountReduction
- *
- * @param array $purchaseAmountReduction
- *
- * @return BillingSettingRent
- */
- public function setPurchaseAmountReduction($purchaseAmountReduction)
- {
- $this->purchaseAmountReduction = $purchaseAmountReduction;
- return $this;
- }
- /**
- * Get purchaseAmountReduction
- *
- * @return array
- */
- public function getPurchaseAmountReduction()
- {
- return $this->purchaseAmountReduction;
- }
- /**
- * Set rentalYearsReduction
- *
- * @param array $rentalYearsReduction
- *
- * @return BillingSettingRent
- */
- public function setRentalYearsReduction($rentalYearsReduction)
- {
- $this->rentalYearsReduction = $rentalYearsReduction;
- return $this;
- }
- /**
- * Get rentalYearsReduction
- *
- * @return array
- */
- public function getRentalYearsReduction()
- {
- return $this->rentalYearsReduction;
- }
- /**
- * Set billingSetting
- *
- * @param \AppBundle\Entity\Billing\BillingSetting $billingSetting
- *
- * @return BillingSettingRent
- */
- public function setBillingSetting(\AppBundle\Entity\Billing\BillingSetting $billingSetting)
- {
- $this->billingSetting = $billingSetting;
- return $this;
- }
- /**
- * Get billingSetting
- *
- * @return \AppBundle\Entity\Billing\BillingSetting
- */
- public function getBillingSetting()
- {
- return $this->billingSetting;
- }
- /**
- * Set thresholdFirstAmount
- *
- * @param float $thresholdFirstAmount
- *
- * @return BillingSettingRent
- */
- public function setThresholdFirstAmount($thresholdFirstAmount)
- {
- $this->thresholdFirstAmount = floatval($thresholdFirstAmount);
- return $this;
- }
- /**
- * Get thresholdFirstAmount
- *
- * @return float
- */
- public function getThresholdFirstAmount()
- {
- return $this->thresholdFirstAmount;
- }
- /**
- * Set thresholdSecondAmount
- *
- * @param float $thresholdSecondAmount
- *
- * @return BillingSettingRent
- */
- public function setThresholdSecondAmount($thresholdSecondAmount)
- {
- $this->thresholdSecondAmount = floatval($thresholdSecondAmount);
- return $this;
- }
- /**
- * Get thresholdSecondAmount
- *
- * @return float
- */
- public function getThresholdSecondAmount()
- {
- return $this->thresholdSecondAmount;
- }
- /**
- * Set thresholdNumberYear
- *
- * @param \Integer $thresholdNumberYear
- *
- * @return BillingSettingRent
- */
- public function setThresholdNumberYear($thresholdNumberYear)
- {
- $this->thresholdNumberYear = $thresholdNumberYear;
- return $this;
- }
- /**
- * Get thresholdNumberYear
- *
- * @return \Integer
- */
- public function getThresholdNumberYear()
- {
- return $this->thresholdNumberYear;
- }
- /**
- * Set instrumentFamilyAndRentalYearsReduction
- *
- * @param array $instrumentFamilyAndRentalYearsReduction
- *
- * @return BillingSettingRent
- */
- public function setInstrumentFamilyAndRentalYearsReduction($instrumentFamilyAndRentalYearsReduction)
- {
- $this->instrumentFamilyAndRentalYearsReduction = $instrumentFamilyAndRentalYearsReduction;
- return $this;
- }
- /**
- * Get instrumentFamilyAndRentalYearsReduction
- *
- * @return array
- */
- public function getInstrumentFamilyAndRentalYearsReduction()
- {
- return $this->instrumentFamilyAndRentalYearsReduction;
- }
- /**
- * Set singleAmount
- *
- * @param float $singleAmount
- *
- * @return BillingSettingRent
- */
- public function setSingleAmount($singleAmount)
- {
- $this->singleAmount = floatval($singleAmount);
- return $this;
- }
- /**
- * Get singleAmount
- *
- * @return float
- */
- public function getSingleAmount()
- {
- return $this->singleAmount;
- }
- /**
- * Set periodicity
- *
- * @param string $periodicity
- *
- * @return BillingSettingRent
- */
- public function setPeriodicity($periodicity)
- {
- $this->periodicity = $periodicity;
- return $this;
- }
- /**
- * Get periodicity
- *
- * @return string
- */
- public function getPeriodicity()
- {
- return $this->periodicity;
- }
- /**
- * Set accountingCode
- *
- * @param integer $accountingCode
- *
- * @return BillingSettingRent
- */
- public function setAccountingCode($accountingCode)
- {
- $this->accountingCode = $accountingCode;
- return $this;
- }
- /**
- * Get accountingCode
- *
- * @return integer
- */
- public function getAccountingCode()
- {
- return $this->accountingCode;
- }
- /**
- * Set nature
- *
- * @param integer $nature
- *
- * @return BillingSettingRent
- */
- public function setNature($nature)
- {
- $this->nature = $nature;
- return $this;
- }
- /**
- * Get nature
- *
- * @return integer
- */
- public function getNature()
- {
- return $this->nature;
- }
- /**
- * Set accountingCodelabel
- *
- * @param string $accountingCodelabel
- *
- * @return BillingSettingRent
- */
- public function setAccountingCodelabel($accountingCodelabel)
- {
- $this->accountingCodelabel = $accountingCodelabel;
- return $this;
- }
- /**
- * Get accountingCodelabel
- *
- * @return string
- */
- public function getAccountingCodelabel()
- {
- return $this->accountingCodelabel;
- }
- }
|