src/Entity/AccountingStudentRegistrationFeeShedul.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AccountingStudentRegistrationFeeShedulRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=AccountingStudentRegistrationFeeShedulRepository::class)
  9.  */
  10. class AccountingStudentRegistrationFeeShedul
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Establishment::class, inversedBy="accountingStudentRegistrationFeeSheduls")
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $establishment;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=AccountingStudentRegistrationFee::class, inversedBy="accountingStudentRegistrationFeeSheduls")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $studentRegistrationFee;
  28.     /**
  29.      * @ORM\Column(type="integer")
  30.      */
  31.     private $order_num;
  32.     /**
  33.      * @ORM\Column(type="date_immutable")
  34.      */
  35.     private $date_due;
  36.     /**
  37.      * @ORM\Column(type="float")
  38.     */
  39.     private $amount;
  40.     /**
  41.      * @ORM\Column(type="float", nullable=true)
  42.     */
  43.     private $amount_paid;
  44.     /**
  45.      * @ORM\Column(type="float", nullable=true)
  46.     */
  47.     private $last_amount_paid;
  48.     /**
  49.      * @ORM\Column(type="integer", nullable=true)
  50.     */
  51.     private $last_payment_id;
  52.     /**
  53.      * @ORM\Column(type="datetime_immutable", nullable=true)
  54.     */
  55.     private $last_payment_at;
  56.     /**
  57.      * @ORM\Column(type="datetime_immutable")
  58.     */
  59.     private $created_at;
  60.     /**
  61.      * @ORM\Column(type="datetime_immutable")
  62.      */
  63.     private $updated_at;
  64.     /**
  65.      * @ORM\Column(type="integer")
  66.      */
  67.     private $created_by;
  68.     /**
  69.      * @ORM\Column(type="integer")
  70.      */
  71.     private $updated_by;
  72.     /**
  73.      * @ORM\OneToMany(targetEntity=AccountingStudentRegistrationFeeShedulPayment::class, mappedBy="studentRegistrationFeeShedul")
  74.      */
  75.     private $accountingStudentRegistrationFeeShedulPayments;
  76.     /**
  77.      * @ORM\Column(type="float", nullable=true)
  78.     */
  79.     private $amount_cancel;
  80.     /**
  81.      * @ORM\Column(type="boolean")
  82.     */
  83.     private $is_cancel;
  84.     /**
  85.      * @ORM\Column(type="float", nullable=true)
  86.     */
  87.     private $amount_reported;
  88.     /**
  89.      * @ORM\Column(type="boolean")
  90.     */
  91.     private $is_reported;
  92.     public function __construct()
  93.     {
  94.         $this->accountingStudentRegistrationFeeShedulPayments = new ArrayCollection();
  95.         $this->amount_paid 0;
  96.         $this->amount_cancel 0;
  97.         $this->is_cancel false;
  98.         $this->is_reported false;
  99.     }
  100.     public function getId(): ?int
  101.     {
  102.         return $this->id;
  103.     }
  104.     public function getEstablishment(): ?Establishment
  105.     {
  106.         return $this->establishment;
  107.     }
  108.     public function setEstablishment(?Establishment $establishment): self
  109.     {
  110.         $this->establishment $establishment;
  111.         return $this;
  112.     }
  113.     public function getStudentRegistrationFee(): ?AccountingStudentRegistrationFee
  114.     {
  115.         return $this->studentRegistrationFee;
  116.     }
  117.     public function setStudentRegistrationFee(?AccountingStudentRegistrationFee $studentRegistrationFee): self
  118.     {
  119.         $this->studentRegistrationFee $studentRegistrationFee;
  120.         return $this;
  121.     }
  122.     /**
  123.      * @return Collection|AccountingStudentRegistrationFeeShedulPayment[]
  124.      */
  125.     public function getAccountingStudentRegistrationFeeShedulPayments(): Collection
  126.     {
  127.         return $this->accountingStudentRegistrationFeeShedulPayments;
  128.     }
  129.     public function addAccountingStudentRegistrationFeeShedulPayment(AccountingStudentRegistrationFeeShedulPayment $accountingStudentRegistrationFeeShedulPayment): self
  130.     {
  131.         if (!$this->accountingStudentRegistrationFeeShedulPayments->contains($accountingStudentRegistrationFeeShedulPayment)) {
  132.             $this->accountingStudentRegistrationFeeShedulPayments[] = $accountingStudentRegistrationFeeShedulPayment;
  133.             $accountingStudentRegistrationFeeShedulPayment->setStudentRegistrationFeeShedul($this);
  134.         }
  135.         return $this;
  136.     }
  137.     public function removeAccountingStudentRegistrationFeeShedulPayment(AccountingStudentRegistrationFeeShedulPayment $accountingStudentRegistrationFeeShedulPayment): self
  138.     {
  139.         if ($this->accountingStudentRegistrationFeeShedulPayments->removeElement($accountingStudentRegistrationFeeShedulPayment)) {
  140.             // set the owning side to null (unless already changed)
  141.             if ($accountingStudentRegistrationFeeShedulPayment->getStudentRegistrationFeeShedul() === $this) {
  142.                 $accountingStudentRegistrationFeeShedulPayment->setStudentRegistrationFeeShedul(null);
  143.             }
  144.         }
  145.         return $this;
  146.     }
  147.     public function getOrderNum(): ?int
  148.     {
  149.         return $this->order_num;
  150.     }
  151.     public function setOrderNum(int $order_num): self
  152.     {
  153.         $this->order_num $order_num;
  154.         return $this;
  155.     }
  156.     public function getDateDue(): ?\DateTimeImmutable
  157.     {
  158.         return $this->date_due;
  159.     }
  160.     public function setDateDue(\DateTimeImmutable $date_due): self
  161.     {
  162.         $this->date_due $date_due;
  163.         return $this;
  164.     }
  165.     public function getAmount(): ?float
  166.     {
  167.         return $this->amount;
  168.     }
  169.     public function setAmount(float $amount): self
  170.     {
  171.         $this->amount $amount;
  172.         return $this;
  173.     }
  174.     public function getCreatedAt(): ?\DateTimeImmutable
  175.     {
  176.         return $this->created_at;
  177.     }
  178.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  179.     {
  180.         $this->created_at $created_at;
  181.         return $this;
  182.     }
  183.     public function getUpdatedAt(): ?\DateTimeImmutable
  184.     {
  185.         return $this->updated_at;
  186.     }
  187.     public function setUpdatedAt(\DateTimeImmutable $updated_at): self
  188.     {
  189.         $this->updated_at $updated_at;
  190.         return $this;
  191.     }
  192.     public function getCreatedBy(): ?int
  193.     {
  194.         return $this->created_by;
  195.     }
  196.     public function setCreatedBy(int $created_by): self
  197.     {
  198.         $this->created_by $created_by;
  199.         return $this;
  200.     }
  201.     public function getUpdatedBy(): ?int
  202.     {
  203.         return $this->updated_by;
  204.     }
  205.     public function setUpdatedBy(int $updated_by): self
  206.     {
  207.         $this->updated_by $updated_by;
  208.         return $this;
  209.     }
  210.     public function getAmountPaid(): ?float
  211.     {
  212.         return $this->amount_paid;
  213.     }
  214.     public function setAmountPaid(?float $amount_paid): self
  215.     {
  216.         $this->amount_paid $amount_paid;
  217.         return $this;
  218.     }
  219.     public function getAmountRest(): ?float
  220.     {
  221.         $amountRest $this->getAmount() - ($this->getAmountPaid() + $this->getAmountCancel());
  222.         return $amountRest;
  223.     }
  224.     public function getLastPaymentAt(): ?\DateTimeImmutable
  225.     {
  226.         return $this->last_payment_at;
  227.     }
  228.     public function setLastPaymentAt(\DateTimeImmutable $last_payment_at): self
  229.     {
  230.         $this->last_payment_at $last_payment_at;
  231.         return $this;
  232.     }
  233.     public function getLastAmountPaid(): ?float
  234.     {
  235.         return $this->last_amount_paid;
  236.     }
  237.     public function setLastAmountPaid(?float $last_amount_paid): self
  238.     {
  239.         $this->last_amount_paid $last_amount_paid;
  240.         return $this;
  241.     }
  242.     public function getLastPaymentId(): ?int
  243.     {
  244.         return $this->last_payment_id;
  245.     }
  246.     public function setLastPaymentId(?int $last_payment_id): self
  247.     {
  248.         $this->last_payment_id $last_payment_id;
  249.         return $this;
  250.     }
  251.     public function getAmountCancel(): ?float
  252.     {
  253.         return $this->amount_cancel;
  254.     }
  255.     public function setAmountCancel(?float $amount_cancel): self
  256.     {
  257.         $this->amount_cancel $amount_cancel;
  258.         return $this;
  259.     }
  260.     public function getIsCancel(): ?bool
  261.     {
  262.         return $this->is_cancel;
  263.     }
  264.     public function setIsCancel(bool $is_cancel): self
  265.     {
  266.         $this->is_cancel $is_cancel;
  267.         return $this;
  268.     }
  269.     public function getAmountReported(): ?float
  270.     {
  271.         return $this->amount_reported;
  272.     }
  273.     public function setAmountReported(?float $amount_reported): self
  274.     {
  275.         $this->amount_reported $amount_reported;
  276.         return $this;
  277.     }
  278.     public function getIsReported(): ?bool
  279.     {
  280.         return $this->is_reported;
  281.     }
  282.     public function setIsReported(bool $is_reported): self
  283.     {
  284.         $this->is_reported $is_reported;
  285.         return $this;
  286.     }
  287. }