DisciplineOtherEstablishment.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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. * Antécédents pédagogique d'une Person (en dehors de l'Organization)
  11. *
  12. * @Iri("http://schema.org/DisciplineOtherEstablishment")
  13. */
  14. #[ORM\Entity]
  15. class DisciplineOtherEstablishment
  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(['disciplineotherestablishment', 'access_details_person'])]
  26. private $id;
  27. #[ORM\Column(type: 'integer', nullable: true)]
  28. #[Assert\Type(type: 'integer', message: 'invalid-integer')]
  29. #[Groups(['disciplineotherestablishment', 'access_details_person'])]
  30. private $year;
  31. /**
  32. * @var Person
  33. */
  34. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Person\Person', inversedBy: 'disciplineotherestablishments')]
  35. #[Groups(['disciplineotherestablishment'])]
  36. private $person;
  37. /**
  38. * @var string
  39. */
  40. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  41. #[Assert\Type(type: 'string')]
  42. #[Groups(['disciplineotherestablishment', 'access_details_person'])]
  43. private $establishmentName;
  44. /**
  45. * @var string
  46. */
  47. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  48. #[Assert\Type(type: 'string')]
  49. #[Groups(['disciplineotherestablishment'])]
  50. private $cityName;
  51. /**
  52. * @var string
  53. */
  54. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  55. #[Assert\Type(type: 'string')]
  56. #[Groups(['disciplineotherestablishment', 'access_details_person'])]
  57. private $educationName;
  58. /**
  59. * @var bool
  60. */
  61. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  62. #[Assert\Type(type: 'boolean')]
  63. #[Assert\NotNull]
  64. #[Groups(['disciplineotherestablishment'])]
  65. private $acquired = false;
  66. /**
  67. * @var string
  68. */
  69. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  70. #[Assert\Type(type: 'string')]
  71. #[Groups(['disciplineotherestablishment', 'access_details_person'])]
  72. private $level;
  73. /**
  74. * Sets id.
  75. *
  76. * @param int $id
  77. *
  78. * @return $this
  79. */
  80. public function setId($id)
  81. {
  82. $this->id = $id;
  83. return $this;
  84. }
  85. /**
  86. * Gets id.
  87. *
  88. * @return int
  89. */
  90. public function getId()
  91. {
  92. return $this->id;
  93. }
  94. /**
  95. * Sets year.
  96. *
  97. * @param number $year
  98. *
  99. * @return $this
  100. */
  101. public function setYear($year = null)
  102. {
  103. $this->year = $year;
  104. return $this;
  105. }
  106. /**
  107. * Gets year.
  108. *
  109. * @return number
  110. */
  111. public function getYear()
  112. {
  113. return $this->year;
  114. }
  115. /**
  116. * Sets person.
  117. *
  118. * @param Person $person
  119. *
  120. * @return $this
  121. */
  122. public function setPerson(Person $person = null)
  123. {
  124. $this->person = $person;
  125. return $this;
  126. }
  127. /**
  128. * Gets person.
  129. *
  130. * @return Person
  131. */
  132. public function getPerson()
  133. {
  134. return $this->person;
  135. }
  136. /**
  137. * Sets establishmentName.
  138. *
  139. * @param string $establishmentName
  140. *
  141. * @return $this
  142. */
  143. public function setEstablishmentName($establishmentName)
  144. {
  145. $this->establishmentName = $establishmentName;
  146. return $this;
  147. }
  148. /**
  149. * Gets establishmentName.
  150. *
  151. * @return string
  152. */
  153. public function getEstablishmentName()
  154. {
  155. return $this->establishmentName;
  156. }
  157. /**
  158. * Sets cityName.
  159. *
  160. * @param string $cityName
  161. *
  162. * @return $this
  163. */
  164. public function setCityName($cityName)
  165. {
  166. $this->cityName = $cityName;
  167. return $this;
  168. }
  169. /**
  170. * Gets cityName.
  171. *
  172. * @return string
  173. */
  174. public function getCityName()
  175. {
  176. return $this->cityName;
  177. }
  178. /**
  179. * Sets educationName.
  180. *
  181. * @param string $educationName
  182. *
  183. * @return $this
  184. */
  185. public function setEducationName($educationName)
  186. {
  187. $this->educationName = $educationName;
  188. return $this;
  189. }
  190. /**
  191. * Gets educationName.
  192. *
  193. * @return string
  194. */
  195. public function getEducationName()
  196. {
  197. return $this->educationName;
  198. }
  199. /**
  200. * Sets acquired.
  201. *
  202. * @param bool $acquired
  203. *
  204. * @return $this
  205. */
  206. public function setAcquired($acquired)
  207. {
  208. $this->acquired = $acquired;
  209. return $this;
  210. }
  211. /**
  212. * Gets acquired.
  213. *
  214. * @return bool
  215. */
  216. public function getAcquired()
  217. {
  218. return $this->acquired;
  219. }
  220. /**
  221. * Sets level.
  222. *
  223. * @param string $level
  224. *
  225. * @return $this
  226. */
  227. public function setLevel($level)
  228. {
  229. $this->level = $level;
  230. return $this;
  231. }
  232. /**
  233. * Gets level.
  234. *
  235. * @return string
  236. */
  237. public function getLevel()
  238. {
  239. return $this->level;
  240. }
  241. }