src/JanusHercules/ExternalApplicationQuestions/Domain/Entity/ConcludisApplicationFormSetup.php line 15

Open in your IDE?
  1. <?php
  2. namespace JanusHercules\ExternalApplicationQuestions\Domain\Entity;
  3. use App\Entity\RecurrentJob;
  4. use App\Utility\DatabaseIdGenerator;
  5. use App\Utility\DateTimeUtility;
  6. use DateTime;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Exception;
  10. #[ORM\Entity]
  11. #[ORM\Table(name: 'concludis_application_form_setups')]
  12. class ConcludisApplicationFormSetup
  13. {
  14. /**
  15. * @throws Exception
  16. */
  17. public function __construct(
  18. RecurrentJob $recurrentJob,
  19. bool $iptTitleEnabled,
  20. bool $iptAddressEnabled,
  21. bool $iptBirthdayEnabled,
  22. bool $iptHomepageEnabled,
  23. bool $iptIncentivesEnabled,
  24. bool $iptPhonePrivateEnabled,
  25. bool $iptPhoneMobileEnabled,
  26. bool $iptPhoneWorkEnabled,
  27. bool $iptFaxEnabled,
  28. bool $iptSourceEnabled,
  29. bool $iptOperationalAreaEnabled,
  30. bool $iptMaritalStatusEnabled,
  31. bool $iptCitizenshipEnabled,
  32. bool $iptGraduationIdEnabled,
  33. bool $iptSchoolNameEnabled,
  34. bool $iptEmploymentTypeEnabled,
  35. bool $iptSalaryExpectationsFixedEnabled,
  36. bool $iptSalaryExpectationsVariableEnabled,
  37. bool $iptSalaryNowFixedEnabled,
  38. bool $iptSalaryNowVariableEnabled,
  39. bool $iptWorkDestinationEnabled,
  40. bool $iptAvailabilityStartdateEnabled,
  41. bool $iptEmploymentDeadlineEnabled,
  42. bool $iptLeadingPositionEnabled,
  43. bool $iptDriversLicenseEnabled,
  44. bool $iptDisablilityEnabled, // that's an actual typo in the Concludis API!
  45. bool $iptDisabilityUploadEnabled,
  46. bool $iptInternalEnabled,
  47. bool $iptOptionalFieldEnabled,
  48. bool $iptCheckUnderageEnabled,
  49. bool $iptEmployeeReferralEnabled,
  50. bool $emailRequired,
  51. bool $cvRequired,
  52. ?string $disabilityLabel,
  53. ?string $disablilityInfo, // that's an actual typo in the Concludis API!
  54. ?string $disabilityUploadLabel,
  55. ?int $questionnaireId,
  56. ?string $questionnaireTitle,
  57. ?string $questionnaireInfo,
  58. ?string $questionnaireLocale
  59. ) {
  60. $this->importedAt = DateTimeUtility::createDateTimeUtc();
  61. $this->recurrentJob = $recurrentJob;
  62. $this->iptTitleEnabled = $iptTitleEnabled;
  63. $this->iptAddressEnabled = $iptAddressEnabled;
  64. $this->iptBirthdayEnabled = $iptBirthdayEnabled;
  65. $this->iptHomepageEnabled = $iptHomepageEnabled;
  66. $this->iptIncentivesEnabled = $iptIncentivesEnabled;
  67. $this->iptPhonePrivateEnabled = $iptPhonePrivateEnabled;
  68. $this->iptPhoneMobileEnabled = $iptPhoneMobileEnabled;
  69. $this->iptPhoneWorkEnabled = $iptPhoneWorkEnabled;
  70. $this->iptFaxEnabled = $iptFaxEnabled;
  71. $this->iptSourceEnabled = $iptSourceEnabled;
  72. $this->iptOperationalAreaEnabled = $iptOperationalAreaEnabled;
  73. $this->iptMaritalStatusEnabled = $iptMaritalStatusEnabled;
  74. $this->iptCitizenshipEnabled = $iptCitizenshipEnabled;
  75. $this->iptGraduationIdEnabled = $iptGraduationIdEnabled;
  76. $this->iptSchoolNameEnabled = $iptSchoolNameEnabled;
  77. $this->iptEmploymentTypeEnabled = $iptEmploymentTypeEnabled;
  78. $this->iptSalaryExpectationsFixedEnabled = $iptSalaryExpectationsFixedEnabled;
  79. $this->iptSalaryExpectationsVariableEnabled = $iptSalaryExpectationsVariableEnabled;
  80. $this->iptSalaryNowFixedEnabled = $iptSalaryNowFixedEnabled;
  81. $this->iptSalaryNowVariableEnabled = $iptSalaryNowVariableEnabled;
  82. $this->iptWorkDestinationEnabled = $iptWorkDestinationEnabled;
  83. $this->iptAvailabilityStartdateEnabled = $iptAvailabilityStartdateEnabled;
  84. $this->iptEmploymentDeadlineEnabled = $iptEmploymentDeadlineEnabled;
  85. $this->iptLeadingPositionEnabled = $iptLeadingPositionEnabled;
  86. $this->iptDriversLicenseEnabled = $iptDriversLicenseEnabled;
  87. $this->iptDisablilityEnabled = $iptDisablilityEnabled;
  88. $this->iptDisabilityUploadEnabled = $iptDisabilityUploadEnabled;
  89. $this->iptInternalEnabled = $iptInternalEnabled;
  90. $this->iptOptionalFieldEnabled = $iptOptionalFieldEnabled;
  91. $this->iptCheckUnderageEnabled = $iptCheckUnderageEnabled;
  92. $this->iptEmployeeReferralEnabled = $iptEmployeeReferralEnabled;
  93. $this->emailRequired = $emailRequired;
  94. $this->cvRequired = $cvRequired;
  95. $this->disabilityLabel = $disabilityLabel;
  96. $this->disablilityInfo = $disablilityInfo;
  97. $this->disabilityUploadLabel = $disabilityUploadLabel;
  98. $this->questionnaireId = $questionnaireId;
  99. $this->questionnaireTitle = $questionnaireTitle;
  100. $this->questionnaireInfo = $questionnaireInfo;
  101. $this->questionnaireLocale = $questionnaireLocale;
  102. }
  103. #[ORM\Id]
  104. #[ORM\GeneratedValue(strategy: 'CUSTOM')]
  105. #[ORM\CustomIdGenerator(class: DatabaseIdGenerator::class)]
  106. #[ORM\Column(
  107. type : Types::GUID,
  108. unique: true
  109. )]
  110. private ?string $id = null;
  111. public function getId(): ?string
  112. {
  113. return $this->id;
  114. }
  115. #[ORM\ManyToOne(
  116. targetEntity: RecurrentJob::class,
  117. cascade : ['persist'],
  118. inversedBy : 'concludisApplicationFormSetups'
  119. )]
  120. #[ORM\JoinColumn(
  121. name : 'recurrent_jobs_id',
  122. referencedColumnName: 'id',
  123. nullable : true,
  124. onDelete : 'CASCADE'
  125. )]
  126. private RecurrentJob $recurrentJob;
  127. public function getRecurrentJob(): RecurrentJob
  128. {
  129. return $this->recurrentJob;
  130. }
  131. #[ORM\Column(
  132. type : Types::DATETIME_MUTABLE,
  133. nullable: false
  134. )]
  135. private DateTime $importedAt;
  136. public function setimportedAt(DateTime $importedAt): void
  137. {
  138. $this->importedAt = $importedAt;
  139. }
  140. public function getimportedAt(): DateTime
  141. {
  142. return $this->importedAt;
  143. }
  144. #[ORM\Column(
  145. type: Types::BOOLEAN,
  146. )]
  147. private bool $iptTitleEnabled;
  148. public function isIptTitleEnabled(): bool
  149. {
  150. return $this->iptTitleEnabled;
  151. }
  152. #[ORM\Column(
  153. type: Types::BOOLEAN,
  154. )]
  155. private bool $iptAddressEnabled;
  156. public function isIptAddressEnabled(): bool
  157. {
  158. return $this->iptAddressEnabled;
  159. }
  160. #[ORM\Column(
  161. type: Types::BOOLEAN,
  162. )]
  163. private bool $iptBirthdayEnabled;
  164. public function isIptBirthdayEnabled(): bool
  165. {
  166. return $this->iptBirthdayEnabled;
  167. }
  168. #[ORM\Column(
  169. type: Types::BOOLEAN,
  170. )]
  171. private bool $iptHomepageEnabled;
  172. public function isIptHomepageEnabled(): bool
  173. {
  174. return $this->iptHomepageEnabled;
  175. }
  176. #[ORM\Column(
  177. type: Types::BOOLEAN,
  178. )]
  179. private bool $iptIncentivesEnabled;
  180. public function isIptIncentivesEnabled(): bool
  181. {
  182. return $this->iptIncentivesEnabled;
  183. }
  184. #[ORM\Column(
  185. type: Types::BOOLEAN,
  186. )]
  187. private bool $iptPhonePrivateEnabled;
  188. public function isIptPhonePrivateEnabled(): bool
  189. {
  190. return $this->iptPhonePrivateEnabled;
  191. }
  192. #[ORM\Column(
  193. type: Types::BOOLEAN,
  194. )]
  195. private bool $iptPhoneMobileEnabled;
  196. public function isIptPhoneMobileEnabled(): bool
  197. {
  198. return $this->iptPhoneMobileEnabled;
  199. }
  200. #[ORM\Column(
  201. type: Types::BOOLEAN,
  202. )]
  203. private bool $iptPhoneWorkEnabled;
  204. public function isIptPhoneWorkEnabled(): bool
  205. {
  206. return $this->iptPhoneWorkEnabled;
  207. }
  208. #[ORM\Column(
  209. type: Types::BOOLEAN,
  210. )]
  211. private bool $iptFaxEnabled;
  212. public function isIptFaxEnabled(): bool
  213. {
  214. return $this->iptFaxEnabled;
  215. }
  216. #[ORM\Column(
  217. type: Types::BOOLEAN,
  218. )]
  219. private bool $iptSourceEnabled;
  220. public function isIptSourceEnabled(): bool
  221. {
  222. return $this->iptSourceEnabled;
  223. }
  224. #[ORM\Column(
  225. type: Types::BOOLEAN,
  226. )]
  227. private bool $iptOperationalAreaEnabled;
  228. public function isIptOperationalAreaEnabled(): bool
  229. {
  230. return $this->iptOperationalAreaEnabled;
  231. }
  232. #[ORM\Column(
  233. type: Types::BOOLEAN,
  234. )]
  235. private bool $iptMaritalStatusEnabled;
  236. public function isIptMaritalStatusEnabled(): bool
  237. {
  238. return $this->iptMaritalStatusEnabled;
  239. }
  240. #[ORM\Column(
  241. type: Types::BOOLEAN,
  242. )]
  243. private bool $iptCitizenshipEnabled;
  244. public function isIptCitizenshipEnabled(): bool
  245. {
  246. return $this->iptCitizenshipEnabled;
  247. }
  248. #[ORM\Column(
  249. type: Types::BOOLEAN,
  250. )]
  251. private bool $iptGraduationIdEnabled;
  252. public function isIptGraduationIdEnabled(): bool
  253. {
  254. return $this->iptGraduationIdEnabled;
  255. }
  256. #[ORM\Column(
  257. type: Types::BOOLEAN,
  258. )]
  259. private bool $iptSchoolNameEnabled;
  260. public function isIptSchoolNameEnabled(): bool
  261. {
  262. return $this->iptSchoolNameEnabled;
  263. }
  264. #[ORM\Column(
  265. type: Types::BOOLEAN,
  266. )]
  267. private bool $iptEmploymentTypeEnabled;
  268. public function isIptEmploymentTypeEnabled(): bool
  269. {
  270. return $this->iptEmploymentTypeEnabled;
  271. }
  272. #[ORM\Column(
  273. type: Types::BOOLEAN,
  274. )]
  275. private bool $iptSalaryExpectationsFixedEnabled;
  276. public function isIptSalaryExpectationsFixedEnabled(): bool
  277. {
  278. return $this->iptSalaryExpectationsFixedEnabled;
  279. }
  280. #[ORM\Column(
  281. type: Types::BOOLEAN,
  282. )]
  283. private bool $iptSalaryExpectationsVariableEnabled;
  284. public function isIptSalaryExpectationsVariableEnabled(): bool
  285. {
  286. return $this->iptSalaryExpectationsVariableEnabled;
  287. }
  288. #[ORM\Column(
  289. type: Types::BOOLEAN,
  290. )]
  291. private bool $iptSalaryNowFixedEnabled;
  292. public function isIptSalaryNowFixedEnabled(): bool
  293. {
  294. return $this->iptSalaryNowFixedEnabled;
  295. }
  296. #[ORM\Column(
  297. type: Types::BOOLEAN,
  298. )]
  299. private bool $iptSalaryNowVariableEnabled;
  300. public function isIptSalaryNowVariableEnabled(): bool
  301. {
  302. return $this->iptSalaryNowVariableEnabled;
  303. }
  304. #[ORM\Column(
  305. type: Types::BOOLEAN,
  306. )]
  307. private bool $iptWorkDestinationEnabled;
  308. public function isIptWorkDestinationEnabled(): bool
  309. {
  310. return $this->iptWorkDestinationEnabled;
  311. }
  312. #[ORM\Column(
  313. type: Types::BOOLEAN,
  314. )]
  315. private bool $iptAvailabilityStartdateEnabled;
  316. public function isIptAvailabilityStartdateEnabled(): bool
  317. {
  318. return $this->iptAvailabilityStartdateEnabled;
  319. }
  320. #[ORM\Column(
  321. type: Types::BOOLEAN,
  322. )]
  323. private bool $iptEmploymentDeadlineEnabled;
  324. public function isIptEmploymentDeadlineEnabled(): bool
  325. {
  326. return $this->iptEmploymentDeadlineEnabled;
  327. }
  328. #[ORM\Column(
  329. type: Types::BOOLEAN,
  330. )]
  331. private bool $iptLeadingPositionEnabled;
  332. public function isIptLeadingPositionEnabled(): bool
  333. {
  334. return $this->iptLeadingPositionEnabled;
  335. }
  336. #[ORM\Column(
  337. type: Types::BOOLEAN,
  338. )]
  339. private bool $iptDriversLicenseEnabled;
  340. public function isIptDriversLicenseEnabled(): bool
  341. {
  342. return $this->iptDriversLicenseEnabled;
  343. }
  344. #[ORM\Column(
  345. type: Types::BOOLEAN,
  346. )]
  347. private bool $iptDisablilityEnabled;
  348. public function isIptDisablilityEnabled(): bool
  349. {
  350. return $this->iptDisablilityEnabled;
  351. }
  352. #[ORM\Column(
  353. type: Types::BOOLEAN,
  354. )]
  355. private bool $iptDisabilityUploadEnabled;
  356. public function isIptDisabilityUploadEnabled(): bool
  357. {
  358. return $this->iptDisabilityUploadEnabled;
  359. }
  360. #[ORM\Column(
  361. type: Types::BOOLEAN,
  362. )]
  363. private bool $iptInternalEnabled;
  364. public function isIptInternalEnabled(): bool
  365. {
  366. return $this->iptInternalEnabled;
  367. }
  368. #[ORM\Column(
  369. type: Types::BOOLEAN,
  370. )]
  371. private bool $iptOptionalFieldEnabled;
  372. public function isIptOptionalFieldEnabled(): bool
  373. {
  374. return $this->iptOptionalFieldEnabled;
  375. }
  376. #[ORM\Column(
  377. type: Types::BOOLEAN,
  378. )]
  379. private bool $iptCheckUnderageEnabled;
  380. public function isIptCheckUnderageEnabled(): bool
  381. {
  382. return $this->iptCheckUnderageEnabled;
  383. }
  384. #[ORM\Column(
  385. type: Types::BOOLEAN,
  386. )]
  387. private bool $iptEmployeeReferralEnabled;
  388. public function isIptEmployeeReferralEnabled(): bool
  389. {
  390. return $this->iptEmployeeReferralEnabled;
  391. }
  392. #[ORM\Column(
  393. type: Types::BOOLEAN,
  394. )]
  395. private bool $emailRequired;
  396. public function isEmailRequired(): bool
  397. {
  398. return $this->emailRequired;
  399. }
  400. #[ORM\Column(
  401. type: Types::BOOLEAN,
  402. )]
  403. private bool $cvRequired;
  404. public function isCvRequired(): bool
  405. {
  406. return $this->cvRequired;
  407. }
  408. #[ORM\Column(
  409. type : Types::STRING,
  410. length : 1024,
  411. nullable: true
  412. )]
  413. private ?string $disabilityLabel;
  414. public function getDisabilityLabel(): ?string
  415. {
  416. return $this->disabilityLabel;
  417. }
  418. #[ORM\Column(
  419. type : Types::STRING,
  420. length : 1024,
  421. nullable: true
  422. )]
  423. private ?string $disablilityInfo;
  424. public function getDisablilityInfo(): ?string
  425. {
  426. return $this->disablilityInfo;
  427. }
  428. #[ORM\Column(
  429. type : Types::STRING,
  430. length : 1024,
  431. nullable: true
  432. )]
  433. private ?string $disabilityUploadLabel;
  434. public function getDisabilityUploadLabel(): ?string
  435. {
  436. return $this->disabilityUploadLabel;
  437. }
  438. #[ORM\Column(
  439. type : Types::SMALLINT,
  440. nullable: true,
  441. options : ['unsigned' => true]
  442. )]
  443. private ?int $questionnaireId;
  444. public function getQuestionnaireId(): ?int
  445. {
  446. return $this->questionnaireId;
  447. }
  448. #[ORM\Column(
  449. type : Types::STRING,
  450. length : 1024,
  451. nullable: true
  452. )]
  453. private ?string $questionnaireTitle;
  454. public function getQuestionnaireTitle(): ?string
  455. {
  456. return $this->questionnaireTitle;
  457. }
  458. // questionnaire info
  459. #[ORM\Column(
  460. type : Types::STRING,
  461. length : 1024,
  462. nullable: true
  463. )]
  464. private ?string $questionnaireInfo;
  465. public function getQuestionnaireInfo(): ?string
  466. {
  467. return $this->questionnaireInfo;
  468. }
  469. #[ORM\Column(
  470. type : Types::STRING,
  471. length : 8,
  472. nullable: true
  473. )]
  474. private ?string $questionnaireLocale;
  475. public function getQuestionnaireLocale(): ?string
  476. {
  477. return $this->questionnaireLocale;
  478. }
  479. }