| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <?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;
- /**
- * Trop-perçu conservé pour être reversé à la Bill suivante
- *
- * @Iri("http://schema.org/BillDebitBalance")
- */
- #[ORM\Entity]
- class BillDebitBalance
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['billdebitbalance'])]
- private $id;
- /**
- * @var BillingSetting
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\AccessBilling', inversedBy: 'billDebitBalances')]
- #[ORM\JoinColumn(nullable: false)]
- #[Assert\NotNull]
- #[Groups(['billdebitbalance'])]
- private $accessBilling;
- /**
- *
- * @var BillPayment
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\BillPayment', inversedBy: 'billDebitBalances', cascade: ['persist'])]
- #[ORM\JoinColumn(nullable: false)]
- #[Assert\NotNull]
- #[Groups(['billdebitbalance'])]
- private $billPayment;
- /**
- * @var float
- */
- #[ORM\Column(type: 'float', nullable: true)]
- #[Assert\Type(type: 'float')]
- #[Groups(['billdebitbalance'])]
- private $amount;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => false])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['billdebitbalance'])]
- private $isUsed = false;
- /**
- * Constructor
- */
- public function __construct()
- {
- $this->accessBilling = 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 amount
- *
- * @param float $amount
- *
- * @return BillDebitBalance
- */
- public function setAmount($amount)
- {
- $this->amount = $amount;
- return $this;
- }
- /**
- * Get amount
- *
- * @return float
- */
- public function getAmount()
- {
- return $this->amount;
- }
- /**
- * Set accessBilling
- *
- * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
- *
- * @return BillDebitBalance
- */
- public function setAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling)
- {
- $this->accessBilling = $accessBilling;
- return $this;
- }
- /**
- * Get accessBilling
- *
- * @return \AppBundle\Entity\Billing\AccessBilling
- */
- public function getAccessBilling()
- {
- return $this->accessBilling;
- }
- /**
- * Set billPayment
- *
- * @param \AppBundle\Entity\Billing\BillPayment $billPayment
- *
- * @return BillDebitBalance
- */
- public function setBillPayment(\AppBundle\Entity\Billing\BillPayment $billPayment)
- {
- $this->billPayment = $billPayment;
- return $this;
- }
- /**
- * Get billPayment
- *
- * @return \AppBundle\Entity\Billing\BillPayment
- */
- public function getBillPayment()
- {
- return $this->billPayment;
- }
- /**
- * Set isUsed
- *
- * @param boolean $isUsed
- *
- * @return BillDebitBalance
- */
- public function setIsUsed($isUsed)
- {
- $this->isUsed = $isUsed;
- return $this;
- }
- /**
- * Get isUsed
- *
- * @return boolean
- */
- public function getIsUsed()
- {
- return $this->isUsed;
- }
- }
|