TeacherSchoolingHistory.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. * Historique des enseignements donnés par une Person
  11. *
  12. * @Iri("http://schema.org/TeacherSchoolingHistory")
  13. */
  14. #[ORM\Entity]
  15. class TeacherSchoolingHistory
  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(['teacherschoolinghistory', 'access_details_person'])]
  26. private $id;
  27. /**
  28. * @var Person
  29. */
  30. #[ORM\ManyToOne(targetEntity: 'Person', inversedBy: 'teacherSchoolingHistories')]
  31. #[ORM\JoinColumn(nullable: false)]
  32. #[Assert\NotNull]
  33. #[Groups(['teacherschoolinghistory'])]
  34. private $person;
  35. /**
  36. * @var string
  37. */
  38. #[ORM\Column(type: 'string', length: 50, nullable: true)]
  39. #[Assert\Type(type: 'string')]
  40. #[Groups(['teacherschoolinghistory'])]
  41. private $establishment;
  42. /**
  43. * @var string
  44. */
  45. #[ORM\Column(type: 'string', length: 50, nullable: true)]
  46. #[Assert\Type(type: 'string')]
  47. #[Groups(['teacherschoolinghistory'])]
  48. private $city;
  49. /**
  50. * @var string
  51. */
  52. #[ORM\Column(type: 'string', length: 30, nullable: true)]
  53. #[Assert\Type(type: 'string')]
  54. #[Groups(['teacherschoolinghistory', 'access_details_person'])]
  55. private $teaching;
  56. /**
  57. * @var \DateTime
  58. */
  59. #[ORM\Column(type: 'date', nullable: true)]
  60. #[Assert\Date]
  61. #[Groups(['teacherschoolinghistory', 'access_details_person'])]
  62. private $beginDate;
  63. /**
  64. * @var \DateTime
  65. */
  66. #[ORM\Column(type: 'date', nullable: true)]
  67. #[Assert\Date]
  68. #[Groups(['teacherschoolinghistory', 'access_details_person'])]
  69. private $endDate;
  70. /**
  71. * Sets id.
  72. *
  73. * @param int $id
  74. *
  75. * @return $this
  76. */
  77. public function setId($id)
  78. {
  79. $this->id = $id;
  80. return $this;
  81. }
  82. /**
  83. * Gets id.
  84. *
  85. * @return int
  86. */
  87. public function getId()
  88. {
  89. return $this->id;
  90. }
  91. /**
  92. * Sets person.
  93. *
  94. * @param Person $person
  95. *
  96. * @return $this
  97. */
  98. public function setPerson(Person $person)
  99. {
  100. $this->person = $person;
  101. return $this;
  102. }
  103. /**
  104. * Gets person.
  105. *
  106. * @return Person
  107. */
  108. public function getPerson()
  109. {
  110. return $this->person;
  111. }
  112. /**
  113. * Sets establishment.
  114. *
  115. * @param string $establishment
  116. *
  117. * @return $this
  118. */
  119. public function setEstablishment($establishment)
  120. {
  121. $this->establishment = $establishment;
  122. return $this;
  123. }
  124. /**
  125. * Gets establishment.
  126. *
  127. * @return string
  128. */
  129. public function getEstablishment()
  130. {
  131. return $this->establishment;
  132. }
  133. /**
  134. * Sets city.
  135. *
  136. * @param string $city
  137. *
  138. * @return $this
  139. */
  140. public function setCity($city)
  141. {
  142. $this->city = $city;
  143. return $this;
  144. }
  145. /**
  146. * Gets city.
  147. *
  148. * @return string
  149. */
  150. public function getCity()
  151. {
  152. return $this->city;
  153. }
  154. /**
  155. * Sets teaching.
  156. *
  157. * @param string $teaching
  158. *
  159. * @return $this
  160. */
  161. public function setTeaching($teaching)
  162. {
  163. $this->teaching = $teaching;
  164. return $this;
  165. }
  166. /**
  167. * Gets teaching.
  168. *
  169. * @return string
  170. */
  171. public function getTeaching()
  172. {
  173. return $this->teaching;
  174. }
  175. /**
  176. * Sets beginDate.
  177. *
  178. * @param \DateTime $beginDate
  179. *
  180. * @return $this
  181. */
  182. public function setBeginDate(\DateTime $beginDate = null)
  183. {
  184. $this->beginDate = $beginDate;
  185. return $this;
  186. }
  187. /**
  188. * Gets beginDate.
  189. *
  190. * @return \DateTime
  191. */
  192. public function getBeginDate()
  193. {
  194. return $this->beginDate;
  195. }
  196. /**
  197. * Sets endDate.
  198. *
  199. * @param \DateTime $endDate
  200. *
  201. * @return $this
  202. */
  203. public function setEndDate(\DateTime $endDate = null)
  204. {
  205. $this->endDate = $endDate;
  206. return $this;
  207. }
  208. /**
  209. * Gets endDate.
  210. *
  211. * @return \DateTime
  212. */
  213. public function getEndDate()
  214. {
  215. return $this->endDate;
  216. }
  217. }