AccessSocial.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. <?php
  2. namespace AppBundle\Entity\AccessAndFunction;
  3. use AppBundle\Entity\AccessAndFunction\Access;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Dunglas\ApiBundle\Annotation\Iri;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. use AppBundle\Entity\Traits\TimestampableEntity;
  10. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  11. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  12. use AppBundle\Validator\Constraints\Access as OpentalentAssert;
  13. /**
  14. * Caractéristiques socio-professionnelles pour un Access
  15. *
  16. * @Iri("http://schema.org/AccessSocial")
  17. */
  18. #[ORM\Entity]
  19. class AccessSocial
  20. {
  21. use TimestampableEntity;
  22. use CreatorUpdaterEntity;
  23. /**
  24. * @var int
  25. */
  26. #[ORM\Column(type: 'integer')]
  27. #[ORM\Id]
  28. #[ORM\GeneratedValue(strategy: 'AUTO')]
  29. #[Groups(['accesssocial', 'access_mass', 'teachers_list', 'personnels_list', 'access_details', 'accesses_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'ca_list', 'othercontact_list', 'board_list', 'fusion_accesses'])]
  30. private $id;
  31. /**
  32. * @var Access
  33. */
  34. #[Assert\Valid]
  35. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accessSocial', cascade: ['persist'], fetch: 'EAGER')]
  36. #[ORM\JoinColumn(nullable: true, onDelete: 'CASCADE')]
  37. #[Groups(['accesssocial'])]
  38. private $access;
  39. /**
  40. * @var string
  41. */
  42. #[ORM\Column(type: 'string', nullable: true)]
  43. #[Assert\Type(type: 'string')]
  44. #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\ProfessionalStatusEnum', 'toArray'])]
  45. #[Groups(['accesssocial', 'access_details_accesssocial', 'access_mass_accesssocial', 'fusion_accesses_accesssocial'])]
  46. private $professionalStatus;
  47. /**
  48. * @var string
  49. */
  50. #[ORM\Column(type: 'string', nullable: true)]
  51. #[Assert\Type(type: 'string')]
  52. #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\TypeOfContractEnum', 'toArray'])]
  53. #[Groups(['accesssocial', 'teachers_list_accesssocial', 'access_mass_accesssocial', 'personnels_list_accesssocial', 'access_details_accesssocial', 'personnels_list_accesssocial', 'fusion_accesses_accesssocial'])]
  54. private $typeOfContract;
  55. /**
  56. * @var string
  57. */
  58. #[ORM\Column(type: 'string', nullable: true)]
  59. #[Assert\Type(type: 'string')]
  60. private $assistedContract;
  61. /**
  62. * @var string
  63. */
  64. #[ORM\Column(type: 'string', nullable: true)]
  65. #[Assert\Type(type: 'string')]
  66. #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\PeriodUnitEnum', 'toArray'])]
  67. #[Groups(['accesssocial', 'access_mass_accesssocial', 'access_details_accesssocial', 'fusion_accesses_accesssocial'])]
  68. private $periodUnit;
  69. /**
  70. * @var string
  71. *
  72. * @OpentalentAssert\SocialSecurity
  73. */
  74. #[ORM\Column(type: 'string', length: 15, nullable: true)]
  75. #[Assert\Type(type: 'string')]
  76. #[Groups(['accesssocial', 'access_details_accesssocial', 'accesses_list_accesssocial', 'student_list_accesssocial', 'guardians_list_accesssocial', 'teachers_list_accesssocial', 'adherent_list_accesssocial', 'personnels_list_accesssocial', 'ca_list_accesssocial', 'othercontact_list_accesssocial', 'board_list_accesssocial', 'fusion_accesses_accesssocial'])]
  77. private $socialSecurity;
  78. /**
  79. * @var string
  80. */
  81. #[ORM\Column(type: 'string', nullable: true)]
  82. #[Assert\Type(type: 'string')]
  83. #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\FamilySituationEnum', 'toArray'])]
  84. #[Groups(['accesssocial', 'access_mass_accesssocial', 'access_details_accesssocial', 'accesses_list_accesssocial', 'guardians_list_accesssocial', 'fusion_accesses_accesssocial'])]
  85. private $familySituation;
  86. /**
  87. * @var string
  88. */
  89. #[ORM\Column(type: 'string', length: 15, nullable: true)]
  90. #[Assert\Type(type: 'string')]
  91. #[Groups(['accesssocial', 'accesses_list_accesssocial', 'guardians_list_accesssocial'])]
  92. private $dependentChildren;
  93. /**
  94. * @var string
  95. *
  96. * @OpentalentAssert\RecipientNumber
  97. */
  98. #[ORM\Column(type: 'string', nullable: true)]
  99. #[Assert\Type(type: 'string')]
  100. #[Groups(['accesssocial', 'access_details_accesssocial', 'accesses_list_accesssocial', 'student_list_accesssocial', 'guardians_list_accesssocial', 'teachers_list_accesssocial', 'adherent_list_accesssocial', 'personnels_list_accesssocial', 'ca_list_accesssocial', 'othercontact_list_accesssocial', 'board_list_accesssocial'])]
  101. private $recipientNumber;
  102. /**
  103. * @var string
  104. */
  105. #[ORM\Column(type: 'string', nullable: true, length: 20)]
  106. #[Assert\Type(type: 'string')]
  107. #[Groups(['accesssocial', 'teachers_list_accesssocial', 'personnels_list_accesssocial'])]
  108. private $salaryNumber;
  109. /**
  110. * @var string
  111. */
  112. #[ORM\Column(type: 'string', nullable: true, length: 30)]
  113. #[Assert\Type(type: 'string')]
  114. #[Groups(['accesssocial', 'teachers_list_accesssocial', 'personnels_list_accesssocial'])]
  115. private $attachmentService;
  116. /**
  117. * The constructor
  118. */
  119. public function __construct() {
  120. }
  121. /**
  122. * Sets id.
  123. *
  124. * @param int $id
  125. *
  126. * @return $this
  127. */
  128. public function setId($id)
  129. {
  130. $this->id = $id;
  131. return $this;
  132. }
  133. /**
  134. * Gets id.
  135. *
  136. * @return int
  137. */
  138. public function getId()
  139. {
  140. return $this->id;
  141. }
  142. /**
  143. * Sets expertLevel.
  144. *
  145. * @param string $expertLevel
  146. *
  147. * @return $this
  148. */
  149. public function setExpertLevel($expertLevel)
  150. {
  151. $this->expertLevel = $expertLevel;
  152. return $this;
  153. }
  154. /**
  155. * Gets expertLevel.
  156. *
  157. * @return string
  158. */
  159. public function getExpertLevel()
  160. {
  161. return $this->expertLevel;
  162. }
  163. /**
  164. * Sets professionalStatus.
  165. *
  166. * @param string $professionalStatus
  167. *
  168. * @return $this
  169. */
  170. public function setProfessionalStatus($professionalStatus)
  171. {
  172. $this->professionalStatus = $professionalStatus;
  173. return $this;
  174. }
  175. /**
  176. * Gets professionalStatus.
  177. *
  178. * @return string
  179. */
  180. public function getProfessionalStatus()
  181. {
  182. return $this->professionalStatus;
  183. }
  184. /**
  185. * Sets typeOfContract.
  186. *
  187. * @param string $typeOfContract
  188. *
  189. * @return $this
  190. */
  191. public function setTypeOfContract($typeOfContract)
  192. {
  193. $this->typeOfContract = $typeOfContract;
  194. return $this;
  195. }
  196. /**
  197. * Gets typeOfContract.
  198. *
  199. * @return string
  200. */
  201. public function getTypeOfContract()
  202. {
  203. return $this->typeOfContract;
  204. }
  205. /**
  206. * Sets assistedContract.
  207. *
  208. * @param string $assistedContract
  209. *
  210. * @return $this
  211. */
  212. public function setAssistedContract($assistedContract)
  213. {
  214. $this->assistedContract = $assistedContract;
  215. return $this;
  216. }
  217. /**
  218. * Gets assistedContract.
  219. *
  220. * @return string
  221. */
  222. public function getAssistedContract()
  223. {
  224. return $this->assistedContract;
  225. }
  226. /**
  227. * Sets periodUnit.
  228. *
  229. * @param string $periodUnit
  230. *
  231. * @return $this
  232. */
  233. public function setPeriodUnit($periodUnit)
  234. {
  235. $this->periodUnit = $periodUnit;
  236. return $this;
  237. }
  238. /**
  239. * Gets periodUnit.
  240. *
  241. * @return string
  242. */
  243. public function getPeriodUnit()
  244. {
  245. return $this->periodUnit;
  246. }
  247. /**
  248. * Sets socialSecurity.
  249. *
  250. * @param string $socialSecurity
  251. *
  252. * @return $this
  253. */
  254. public function setSocialSecurity($socialSecurity)
  255. {
  256. $this->socialSecurity = $socialSecurity;
  257. return $this;
  258. }
  259. /**
  260. * Gets socialSecurity.
  261. *
  262. * @return string
  263. */
  264. public function getSocialSecurity()
  265. {
  266. return $this->socialSecurity;
  267. }
  268. /**
  269. * Sets familySituation.
  270. *
  271. * @param string $familySituation
  272. *
  273. * @return $this
  274. */
  275. public function setFamilySituation($familySituation)
  276. {
  277. $this->familySituation = $familySituation;
  278. return $this;
  279. }
  280. /**
  281. * Gets familySituation.
  282. *
  283. * @return string
  284. */
  285. public function getFamilySituation()
  286. {
  287. return $this->familySituation;
  288. }
  289. /**
  290. * Sets dependentChildren.
  291. *
  292. * @param string $dependentChildren
  293. *
  294. * @return $this
  295. */
  296. public function setDependentChildren($dependentChildren)
  297. {
  298. $this->dependentChildren = $dependentChildren;
  299. return $this;
  300. }
  301. /**
  302. * Gets dependentChildren.
  303. *
  304. * @return string
  305. */
  306. public function getDependentChildren()
  307. {
  308. return $this->dependentChildren;
  309. }
  310. /**
  311. * Set access
  312. *
  313. * @param \AppBundle\Entity\AccessAndFunction\Access $access
  314. *
  315. * @return AccessSocial
  316. */
  317. public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access = null)
  318. {
  319. $this->access = $access;
  320. return $this;
  321. }
  322. /**
  323. * Get access
  324. *
  325. * @return \AppBundle\Entity\AccessAndFunction\Access
  326. */
  327. public function getAccess()
  328. {
  329. return $this->access;
  330. }
  331. /**
  332. * Set recipientNumber
  333. *
  334. * @param string $recipientNumber
  335. *
  336. * @return AccessSocial
  337. */
  338. public function setRecipientNumber($recipientNumber)
  339. {
  340. $this->recipientNumber = $recipientNumber;
  341. return $this;
  342. }
  343. /**
  344. * Get recipientNumber
  345. *
  346. * @return string
  347. */
  348. public function getRecipientNumber()
  349. {
  350. return $this->recipientNumber;
  351. }
  352. /**
  353. * @return string
  354. */
  355. public function getSalaryNumber()
  356. {
  357. return $this->salaryNumber;
  358. }
  359. /**
  360. * @param $salaryNumber
  361. */
  362. public function setSalaryNumber($salaryNumber)
  363. {
  364. $this->salaryNumber = $salaryNumber;
  365. return $this;
  366. }
  367. /**
  368. * @return string
  369. */
  370. public function getAttachmentService()
  371. {
  372. return $this->attachmentService;
  373. }
  374. /**
  375. * @param $attachmentService
  376. */
  377. public function setAttachmentService($attachmentService)
  378. {
  379. $this->attachmentService = $attachmentService;
  380. return $this;
  381. }
  382. }