src/Entity/PckPackages.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * StudentPackages
  9. */
  10. #[ORM\Table(name: 'pck_packages')]
  11. #[ORM\Entity(repositoryClass: 'App\Repository\PckPackagesRepository')]
  12. class PckPackages
  13. {
  14. /**
  15. * @var int
  16. */
  17. #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
  18. #[ORM\Id]
  19. #[ORM\GeneratedValue(strategy: 'IDENTITY')]
  20. private $id;
  21. #[ORM\Column(type: 'boolean')]
  22. private $active;
  23. #[ORM\Column(type: 'integer')]
  24. private $creditBalance;
  25. //private $pckTransactionsPackages;
  26. #[ORM\ManyToOne(targetEntity: Students::class, inversedBy: 'pckPackages')]
  27. #[ORM\JoinColumn(nullable: false)]
  28. private $Student;
  29. #[ORM\ManyToOne(targetEntity: PckPackageTypes::class, inversedBy: 'pckPackages')]
  30. #[ORM\JoinColumn(nullable: false)]
  31. private $PackageTypes;
  32. #[ORM\Column(length: 45, nullable: true)]
  33. private ?string $fulfilled_reason = null;
  34. #[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
  35. private ?\DateTimeInterface $expiration_date = null;
  36. #[ORM\Column(nullable: true)]
  37. private ?bool $fulfilled = null;
  38. public function __construct()
  39. {
  40. //$this->pckTransactionsPackages = new ArrayCollection();
  41. }
  42. public function getId(): ?int
  43. {
  44. return $this->id;
  45. }
  46. public function getActive(): ?bool
  47. {
  48. return $this->active;
  49. }
  50. public function setActive(bool $active): self
  51. {
  52. $this->active = $active;
  53. return $this;
  54. }
  55. public function getCreditBalance(): ?int
  56. {
  57. return $this->creditBalance;
  58. }
  59. public function setCreditBalance(int $creditBalance): self
  60. {
  61. $this->creditBalance = $creditBalance;
  62. return $this;
  63. }
  64. /**
  65. * @return Collection|PckTransactions[]
  66. */
  67. // public function getPckTransactionsPackages(): Collection
  68. // {
  69. // return $this->pckTransactionsPackages;
  70. // }
  71. public function getStudent(): ?Students
  72. {
  73. return $this->Student;
  74. }
  75. public function setStudent(?Students $Student): self
  76. {
  77. $this->Student = $Student;
  78. return $this;
  79. }
  80. public function getPackageTypes(): ?PckPackageTypes
  81. {
  82. return $this->PackageTypes;
  83. }
  84. public function setPackageTypes(?PckPackageTypes $PackageTypes): self
  85. {
  86. $this->PackageTypes = $PackageTypes;
  87. return $this;
  88. }
  89. // public function addPckTransactionsPackage(PckTransactions $pckTransactionsPackage): self
  90. // {
  91. // if (!$this->pckTransactionsPackages->contains($pckTransactionsPackage)) {
  92. // $this->pckTransactionsPackages[] = $pckTransactionsPackage;
  93. // $pckTransactionsPackage->addPckTransactionsPackage($this);
  94. // }
  95. //
  96. // return $this;
  97. // }
  98. //
  99. // public function removePckTransactionsPackage(PckTransactions $pckTransactionsPackage): self
  100. // {
  101. // if ($this->pckTransactionsPackages->removeElement($pckTransactionsPackage)) {
  102. // $pckTransactionsPackage->removePckTransactionsPackage($this);
  103. // }
  104. //
  105. // return $this;
  106. // }
  107. public function getFulfilledReason(): ?string
  108. {
  109. return $this->fulfilled_reason;
  110. }
  111. public function setFulfilledReason(?string $fulfilled_reason): static
  112. {
  113. $this->fulfilled_reason = $fulfilled_reason;
  114. return $this;
  115. }
  116. public function getExpirationDate(): ?\DateTimeInterface
  117. {
  118. return $this->expiration_date;
  119. }
  120. public function setExpirationDate(?\DateTimeInterface $expiration_date): static
  121. {
  122. $this->expiration_date = $expiration_date;
  123. return $this;
  124. }
  125. public function isFulfilled(): ?bool
  126. {
  127. return $this->fulfilled;
  128. }
  129. public function setFulfilled(?bool $fulfilled): static
  130. {
  131. $this->fulfilled = $fulfilled;
  132. return $this;
  133. }
  134. }