src/Admin/Modules/Contract/Entity/ContractInstallment.php line 12

  1. <?php
  2. namespace App\Admin\Modules\Contract\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Table(name="contract_installment")
  7.  * @ORM\Entity
  8.  */
  9. class ContractInstallment
  10. {
  11.     /**
  12.      * @var int
  13.      *
  14.      * @ORM\Column(type="bigint", options={"unsigned"=true}))
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue(strategy="AUTO")
  17.      */
  18.     protected $id;
  19.     
  20.     /**
  21.      * @var \App\Admin\Modules\Contract\Entity\Contract
  22.      *
  23.      * @ORM\ManyToOne(targetEntity="App\Admin\Modules\Contract\Entity\Contract", inversedBy="installments")
  24.      * @ORM\JoinColumns({
  25.      *   @ORM\JoinColumn(name="id_contract", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  26.      * })
  27.      */
  28.     private $contract;
  29.     
  30.     /**
  31.      * @ORM\Column(name="amount", type="decimal", precision=14, scale=2, nullable=false)
  32.      */
  33.     private $amount;
  34.     
  35.     /**
  36.      * @ORM\Column(name="repayment_days", type="smallint", nullable=false)
  37.      */
  38.     private $repaymentDays;
  39.     /**
  40.      * @var int
  41.      *
  42.      * @ORM\Column(name="is_paid", type="boolean", nullable=false)
  43.      */
  44.     private $isPaid;
  45.     
  46.     public function __construct()
  47.     {
  48.         $this->isPaid false;
  49.     }
  50.     public function getId(): ?string
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getAmount(): ?string
  55.     {
  56.         return $this->amount;
  57.     }
  58.     public function setAmount(string $amount): self
  59.     {
  60.         $this->amount $amount;
  61.         return $this;
  62.     }
  63.     public function getContract(): ?Contract
  64.     {
  65.         return $this->contract;
  66.     }
  67.     public function setContract(?Contract $contract): self
  68.     {
  69.         $this->contract $contract;
  70.         return $this;
  71.     }
  72.     public function getIsPaid(): ?bool
  73.     {
  74.         return $this->isPaid;
  75.     }
  76.     public function setIsPaid(bool $isPaid): self
  77.     {
  78.         $this->isPaid $isPaid;
  79.         return $this;
  80.     }
  81.     public function getRepaymentDays(): ?int
  82.     {
  83.         return $this->repaymentDays;
  84.     }
  85.     public function setRepaymentDays(int $repaymentDays): self
  86.     {
  87.         $this->repaymentDays $repaymentDays;
  88.         return $this;
  89.     }
  90. }