src/Entity/Core/Institution.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core;
  3. use App\Entity\Core\Classroom\ClassroomType;
  4. use DateTime;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Table('institution')]
  8. #[ORM\Entity(repositoryClass: InstitutionRepository::class)]
  9. class Institution
  10. {
  11. /**
  12. * @var int
  13. */
  14. #[ORM\Column(name: 'id', type: 'integer')]
  15. #[ORM\Id]
  16. #[ORM\GeneratedValue(strategy: 'AUTO')]
  17. private $id;
  18. /**
  19. * @var string
  20. */
  21. #[ORM\Column(name: 'name', type: 'text')]
  22. private $name;
  23. /**
  24. * @var bool
  25. */
  26. #[ORM\Column(type: 'boolean', nullable: true)]
  27. private $customer;
  28. /**
  29. * @var bool
  30. */
  31. #[ORM\Column(type: 'boolean', nullable: true)]
  32. private $payingCustomer;
  33. /**
  34. * @var bool
  35. */
  36. #[ORM\Column(type: 'boolean', nullable: true)]
  37. private $hasRenewed;
  38. #[ORM\Column(name: 'uni_instnr', type: 'text', nullable: true, options: ['default' => null])]
  39. private ?string $instnr = null;
  40. /**
  41. * @var DateTime
  42. */
  43. #[ORM\Column(name: 'expiration_basis', type: 'datetime', nullable: true)]
  44. private $expirationBasis;
  45. /**
  46. * @var DateTime
  47. */
  48. #[ORM\Column(name: 'expiration_self_study', type: 'datetime', nullable: true)]
  49. private $expirationSelfStudy;
  50. /**
  51. * @var DateTime
  52. */
  53. #[ORM\Column(name: 'expiration_textbook', type: 'datetime', nullable: true)]
  54. private $expirationTextbook;
  55. /**
  56. * @var ArrayCollection|ClassroomType[]
  57. */
  58. #[ORM\JoinTable(name: 'relation_institution_classroom_types')]
  59. #[ORM\JoinColumn(name: 'institution', referencedColumnName: 'id')]
  60. #[ORM\InverseJoinColumn(name: 'classroom_type', referencedColumnName: 'id')]
  61. #[ORM\ManyToMany(targetEntity: ClassroomType::class)]
  62. private $classroomTypes;
  63. /**
  64. * @return int
  65. */
  66. public function getId()
  67. {
  68. return $this->id;
  69. }
  70. /**
  71. * @param int $id
  72. */
  73. public function setId($id)
  74. {
  75. $this->id = $id;
  76. }
  77. /**
  78. * @return string
  79. */
  80. public function getName()
  81. {
  82. return $this->name;
  83. }
  84. /**
  85. * @param string $name
  86. */
  87. public function setName($name)
  88. {
  89. $this->name = $name;
  90. }
  91. public function getInstnr(): ?string
  92. {
  93. return $this->instnr;
  94. }
  95. public function setInstnr(?string $instnr)
  96. {
  97. $this->instnr = $instnr;
  98. }
  99. public function isCustomer(): ?bool
  100. {
  101. return $this->customer;
  102. }
  103. public function setCustomer(bool $customer)
  104. {
  105. $this->customer = $customer;
  106. }
  107. /**
  108. * @return bool
  109. */
  110. public function isPayingCustomer(): ?bool
  111. {
  112. return $this->payingCustomer;
  113. }
  114. public function setPayingCustomer(bool $payingCustomer): void
  115. {
  116. $this->payingCustomer = $payingCustomer;
  117. }
  118. /**
  119. * @return bool
  120. */
  121. public function hasRenewed(): ?bool
  122. {
  123. return $this->hasRenewed;
  124. }
  125. public function setHasRenewed(bool $hasRenewed): void
  126. {
  127. $this->hasRenewed = $hasRenewed;
  128. }
  129. /**
  130. * @return ClassroomType[]|ArrayCollection
  131. */
  132. public function getClassroomTypes()
  133. {
  134. return $this->classroomTypes;
  135. }
  136. /**
  137. * @param ClassroomType[]|ArrayCollection $classroomTypes
  138. */
  139. public function setClassroomTypes($classroomTypes): void
  140. {
  141. $this->classroomTypes = $classroomTypes;
  142. }
  143. public function getExpirationBasis(): ?DateTime
  144. {
  145. return $this->expirationBasis;
  146. }
  147. public function setExpirationBasis(?DateTime $expirationBasis): void
  148. {
  149. $this->expirationBasis = $expirationBasis;
  150. }
  151. public function getExpirationSelfStudy(): ?DateTime
  152. {
  153. return $this->expirationSelfStudy;
  154. }
  155. public function setExpirationSelfStudy(?DateTime $expirationSelfStudy): void
  156. {
  157. $this->expirationSelfStudy = $expirationSelfStudy;
  158. }
  159. public function getExpirationTextbook(): ?DateTime
  160. {
  161. return $this->expirationTextbook;
  162. }
  163. public function setExpirationTextbook(?DateTime $expirationTextbook): void
  164. {
  165. $this->expirationTextbook = $expirationTextbook;
  166. }
  167. }