SchoolingInEstablishment.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <?php
  2. namespace AppBundle\Entity\Person;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Dunglas\ApiBundle\Annotation\Iri;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use AppBundle\Entity\Traits\TimestampableEntity;
  8. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  9. /**
  10. * Parcours scolaire d'une Person
  11. *
  12. * @Iri("http://schema.org/SchoolingInEstablishment")
  13. */
  14. #[ORM\Entity]
  15. class SchoolingInEstablishment
  16. {
  17. use TimestampableEntity;
  18. use CreatorUpdaterEntity;
  19. /**
  20. * @var int
  21. */
  22. #[ORM\Column(type: 'integer')]
  23. #[ORM\Id]
  24. #[ORM\GeneratedValue(strategy: 'AUTO')]
  25. #[Groups(['schoolinginestablishment', 'access_details_person'])]
  26. private $id;
  27. /**
  28. * @var string
  29. */
  30. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  31. #[Assert\Type(type: 'string')]
  32. #[Groups(['schoolinginestablishment', 'access_details_person'])]
  33. private $establishmentName;
  34. /**
  35. * @var string
  36. */
  37. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  38. #[Assert\Type(type: 'string')]
  39. #[Groups(['schoolinginestablishment'])]
  40. private $cityName;
  41. /**
  42. * @var string
  43. */
  44. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  45. #[Assert\Type(type: 'string')]
  46. #[Groups(['schoolinginestablishment'])]
  47. private $disponibility;
  48. /**
  49. * @var string
  50. */
  51. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  52. #[Assert\Type(type: 'string')]
  53. #[Groups(['schoolinginestablishment', 'access_details_person'])]
  54. private $className;
  55. #[ORM\Column(type: 'integer', nullable: true)]
  56. #[Assert\Type(type: 'integer', message: 'invalid-integer')]
  57. #[Groups(['schoolinginestablishment'])]
  58. private $startYear;
  59. #[ORM\Column(type: 'integer', nullable: true)]
  60. #[Assert\Type(type: 'integer', message: 'invalid-integer')]
  61. #[Groups(['schoolinginestablishment'])]
  62. private $endYear;
  63. /**
  64. * @var Person
  65. */
  66. #[ORM\ManyToOne(targetEntity: 'Person', inversedBy: 'schoolingEstablisments')]
  67. #[Groups(['schoolinginestablishment'])]
  68. private $person;
  69. /**
  70. * @var string
  71. */
  72. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  73. #[Assert\Type(type: 'string')]
  74. #[Groups(['schoolinginestablishment', 'access_details_person'])]
  75. private $teacher;
  76. /**
  77. * Sets id.
  78. *
  79. * @param int $id
  80. *
  81. * @return $this
  82. */
  83. public function setId($id)
  84. {
  85. $this->id = $id;
  86. return $this;
  87. }
  88. /**
  89. * Gets id.
  90. *
  91. * @return int
  92. */
  93. public function getId()
  94. {
  95. return $this->id;
  96. }
  97. /**
  98. * Sets establishmentName.
  99. *
  100. * @param string $establishmentName
  101. *
  102. * @return $this
  103. */
  104. public function setEstablishmentName($establishmentName)
  105. {
  106. $this->establishmentName = $establishmentName;
  107. return $this;
  108. }
  109. /**
  110. * Gets establishmentName.
  111. *
  112. * @return string
  113. */
  114. public function getEstablishmentName()
  115. {
  116. return $this->establishmentName;
  117. }
  118. /**
  119. * Sets cityName.
  120. *
  121. * @param string $cityName
  122. *
  123. * @return $this
  124. */
  125. public function setCityName($cityName)
  126. {
  127. $this->cityName = $cityName;
  128. return $this;
  129. }
  130. /**
  131. * Gets cityName.
  132. *
  133. * @return string
  134. */
  135. public function getCityName()
  136. {
  137. return $this->cityName;
  138. }
  139. /**
  140. * Sets disponibility.
  141. *
  142. * @param string $disponibility
  143. *
  144. * @return $this
  145. */
  146. public function setDisponibility($disponibility)
  147. {
  148. $this->disponibility = $disponibility;
  149. return $this;
  150. }
  151. /**
  152. * Gets disponibility.
  153. *
  154. * @return string
  155. */
  156. public function getDisponibility()
  157. {
  158. return $this->disponibility;
  159. }
  160. /**
  161. * Sets className.
  162. *
  163. * @param string $className
  164. *
  165. * @return $this
  166. */
  167. public function setClassName($className)
  168. {
  169. $this->className = $className;
  170. return $this;
  171. }
  172. /**
  173. * Gets className.
  174. *
  175. * @return string
  176. */
  177. public function getClassName()
  178. {
  179. return $this->className;
  180. }
  181. /**
  182. * Sets person.
  183. *
  184. * @param Person $person
  185. *
  186. * @return $this
  187. */
  188. public function setPerson(Person $person = null)
  189. {
  190. $this->person = $person;
  191. return $this;
  192. }
  193. /**
  194. * Gets person.
  195. *
  196. * @return Person
  197. */
  198. public function getPerson()
  199. {
  200. return $this->person;
  201. }
  202. /**
  203. * Set teacher
  204. *
  205. * @param string $teacher
  206. *
  207. * @return SchoolingInEstablishment
  208. */
  209. public function setTeacher($teacher)
  210. {
  211. $this->teacher = $teacher;
  212. return $this;
  213. }
  214. /**
  215. * Get teacher
  216. *
  217. * @return string
  218. */
  219. public function getTeacher()
  220. {
  221. return $this->teacher;
  222. }
  223. /**
  224. * Set startYear
  225. *
  226. * @param integer $startYear
  227. *
  228. * @return SchoolingInEstablishment
  229. */
  230. public function setStartYear($startYear)
  231. {
  232. $this->startYear = $startYear;
  233. return $this;
  234. }
  235. /**
  236. * Get startYear
  237. *
  238. * @return integer
  239. */
  240. public function getStartYear()
  241. {
  242. return $this->startYear;
  243. }
  244. /**
  245. * Set endYear
  246. *
  247. * @param integer $endYear
  248. *
  249. * @return SchoolingInEstablishment
  250. */
  251. public function setEndYear($endYear)
  252. {
  253. $this->endYear = $endYear;
  254. return $this;
  255. }
  256. /**
  257. * Get endYear
  258. *
  259. * @return integer
  260. */
  261. public function getEndYear()
  262. {
  263. return $this->endYear;
  264. }
  265. }