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: \App\Entity\Core\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: \App\Entity\Core\Classroom\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. /**
  115. * @param bool $payingCustomer
  116. */
  117. public function setPayingCustomer(bool $payingCustomer): void
  118. {
  119. $this->payingCustomer = $payingCustomer;
  120. }
  121. /**
  122. * @return bool
  123. */
  124. public function hasRenewed(): ?bool
  125. {
  126. return $this->hasRenewed;
  127. }
  128. /**
  129. * @param bool $hasRenewed
  130. */
  131. public function setHasRenewed(bool $hasRenewed): void
  132. {
  133. $this->hasRenewed = $hasRenewed;
  134. }
  135. /**
  136. * @return ClassroomType[]|ArrayCollection
  137. */
  138. public function getClassroomTypes()
  139. {
  140. return $this->classroomTypes;
  141. }
  142. /**
  143. * @param ClassroomType[]|ArrayCollection $classroomTypes
  144. */
  145. public function setClassroomTypes($classroomTypes): void
  146. {
  147. $this->classroomTypes = $classroomTypes;
  148. }
  149. /**
  150. * @return DateTime|null
  151. */
  152. public function getExpirationBasis(): ?DateTime
  153. {
  154. return $this->expirationBasis;
  155. }
  156. /**
  157. * @param DateTime|null $expirationBasis
  158. */
  159. public function setExpirationBasis(?DateTime $expirationBasis): void
  160. {
  161. $this->expirationBasis = $expirationBasis;
  162. }
  163. /**
  164. * @return DateTime|null
  165. */
  166. public function getExpirationSelfStudy(): ?DateTime
  167. {
  168. return $this->expirationSelfStudy;
  169. }
  170. /**
  171. * @param DateTime|null $expirationSelfStudy
  172. */
  173. public function setExpirationSelfStudy(?DateTime $expirationSelfStudy): void
  174. {
  175. $this->expirationSelfStudy = $expirationSelfStudy;
  176. }
  177. /**
  178. * @return DateTime|null
  179. */
  180. public function getExpirationTextbook(): ?DateTime
  181. {
  182. return $this->expirationTextbook;
  183. }
  184. /**
  185. * @param DateTime|null $expirationTextbook
  186. */
  187. public function setExpirationTextbook(?DateTime $expirationTextbook): void
  188. {
  189. $this->expirationTextbook = $expirationTextbook;
  190. }
  191. }