| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- <?php
- namespace AppBundle\Entity\Product;
- use AppBundle\Entity\Billing\FamilyQuotient;
- use AppBundle\Filter\Billing\ResidenceArea;
- 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;
- /**
- * Réduction appliquée à un élément de facturation Intangible,
- * résultant du quotient familial et/ou de la zone de résidence
- *
- * @Iri("http://schema.org/IntangibleDiscountDetail")
- */
- #[ORM\Entity]
- class IntangibleDiscountDetail
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['intangiblediscountdetail'])]
- private $id;
- /**
- * @var IntangiblePriceAndDiscount
- */
- #[ORM\ManyToOne(targetEntity: 'IntangiblePriceAndDiscount', inversedBy: 'intangibleDiscountDetails')]
- #[ORM\JoinColumn(nullable: false)]
- #[Assert\NotNull]
- #[Groups(['intangiblediscountdetail'])]
- private $intangiblePriceAndDiscount;
- /**
- * @var ResidenceArea
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\ResidenceArea', inversedBy: 'intangibleDiscountDetails')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['intangiblediscountdetail'])]
- private $residenceArea;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['AppBundle\Enum\Billing\PricingLineInvoiceLineEnum', 'toArray'])]
- #[Groups(['intangiblepriceanddiscount'])]
- private $pricingLine;
- /**
- * @var FamilyQuotient
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\FamilyQuotient', inversedBy: 'intangibleDiscountDetails')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['intangiblediscountdetail'])]
- private $familyQuotient;
- /**
- * @var float
- */
- #[ORM\Column(type: 'float', nullable: true)]
- #[Assert\Type(type: 'float')]
- #[Groups(['intangiblediscountdetail'])]
- private $price;
- /**
- * 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 pricingLine
- *
- * @param string $pricingLine
- *
- * @return IntangibleDiscountDetail
- */
- public function setPricingLine($pricingLine = null)
- {
- $this->pricingLine = $pricingLine;
- return $this;
- }
- /**
- * Get pricingLine
- *
- * @return string
- */
- public function getPricingLine()
- {
- return $this->pricingLine;
- }
- /**
- * Set price
- *
- * @param float $price
- *
- * @return IntangibleDiscountDetail
- */
- public function setPrice($price)
- {
- $this->price = floatval($price);
- return $this;
- }
- /**
- * Get price
- *
- * @return float
- */
- public function getPrice()
- {
- return $this->price;
- }
- /**
- * Set intangiblePriceAndDiscount
- *
- * @param \AppBundle\Entity\Product\IntangiblePriceAndDiscount $intangiblePriceAndDiscount
- *
- * @return IntangibleDiscountDetail
- */
- public function setIntangiblePriceAndDiscount(\AppBundle\Entity\Product\IntangiblePriceAndDiscount $intangiblePriceAndDiscount)
- {
- $this->intangiblePriceAndDiscount = $intangiblePriceAndDiscount;
- return $this;
- }
- /**
- * Get intangiblePriceAndDiscount
- *
- * @return \AppBundle\Entity\Product\IntangiblePriceAndDiscount
- */
- public function getIntangiblePriceAndDiscount()
- {
- return $this->intangiblePriceAndDiscount;
- }
- /**
- * Set residenceArea
- *
- * @param \AppBundle\Entity\Billing\ResidenceArea $residenceArea
- *
- * @return IntangibleDiscountDetail
- */
- public function setResidenceArea(\AppBundle\Entity\Billing\ResidenceArea $residenceArea = null)
- {
- $this->residenceArea = $residenceArea;
- return $this;
- }
- /**
- * Get residenceArea
- *
- * @return \AppBundle\Entity\Billing\ResidenceArea
- */
- public function getResidenceArea()
- {
- return $this->residenceArea;
- }
- /**
- * Set familyQuotient
- *
- * @param \AppBundle\Entity\Billing\FamilyQuotient $familyQuotient
- *
- * @return IntangibleDiscountDetail
- */
- public function setFamilyQuotient(\AppBundle\Entity\Billing\FamilyQuotient $familyQuotient = null)
- {
- $this->familyQuotient = $familyQuotient;
- return $this;
- }
- /**
- * Get familyQuotient
- *
- * @return \AppBundle\Entity\Billing\FamilyQuotient
- */
- public function getFamilyQuotient()
- {
- return $this->familyQuotient;
- }
- }
|