src/JanusHercules/RecurrentJobsSearch/Presentation/Entity/DenormalizedRecurrentJob.php line 17

Open in your IDE?
  1. <?php
  2. namespace JanusHercules\RecurrentJobsSearch\Presentation\Entity;
  3. use App\Entity\RecurrentJob;
  4. use DateTime;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping\Column;
  7. use Doctrine\ORM\Mapping\Entity;
  8. use Doctrine\ORM\Mapping\Id;
  9. use Doctrine\ORM\Mapping\Table;
  10. #[Entity]
  11. #[Table(
  12. name: 'denormalized_recurrent_jobs'
  13. )]
  14. class DenormalizedRecurrentJob
  15. {
  16. public function __construct(
  17. string $recurrentJobId
  18. ) {
  19. $this->recurrentJobId = $recurrentJobId;
  20. }
  21. #[Id]
  22. #[Column(
  23. name : 'recurrent_job_id',
  24. type : Types::GUID,
  25. nullable: false
  26. )]
  27. private string $recurrentJobId;
  28. public function getRecurrentJobId(): string
  29. {
  30. return $this->recurrentJobId;
  31. }
  32. #[Column(
  33. name : 'city',
  34. type : Types::STRING,
  35. length : 256,
  36. nullable: true
  37. )]
  38. private ?string $city;
  39. public function getCity(): ?string
  40. {
  41. return $this->city;
  42. }
  43. public function setCity(?string $city): void
  44. {
  45. if (!is_null($city)) {
  46. $this->city = $city;
  47. } else {
  48. $this->city = null;
  49. }
  50. }
  51. #[Column(
  52. name : 'zipcode',
  53. type : Types::STRING,
  54. length : 8,
  55. nullable: true
  56. )]
  57. private ?string $zipcode;
  58. public function getZipcode(): ?string
  59. {
  60. return $this->zipcode;
  61. }
  62. public function setZipcode(?string $zipcode): void
  63. {
  64. if (!is_null($zipcode)) {
  65. $this->zipcode = $zipcode;
  66. } else {
  67. $this->zipcode = null;
  68. }
  69. }
  70. #[Column(
  71. type : Types::STRING,
  72. length : 512,
  73. nullable: true
  74. )]
  75. // @NOTE: Value from RecurrentJob -> getJoboffererProfile -> getBusinessName
  76. private ?string $businessName;
  77. public function getBusinessName(): ?string
  78. {
  79. return $this->businessName;
  80. }
  81. public function setBusinessName(?string $businessName): void
  82. {
  83. if (!is_null($businessName)) {
  84. $this->businessName = $businessName;
  85. } else {
  86. $this->businessName = null;
  87. }
  88. }
  89. #[Column(
  90. name : 'self_description',
  91. type : Types::TEXT,
  92. length : 2048,
  93. nullable: true
  94. )]
  95. private ?string $selfDescription; // Quelle: profile (jobofferer)
  96. public function getSelfDescription(): ?string
  97. {
  98. return $this->selfDescription;
  99. }
  100. public function setSelfDescription(?string $selfDescription): void
  101. {
  102. if (!is_null($selfDescription)) {
  103. $this->selfDescription = mb_substr($selfDescription, 0, 2048);
  104. } else {
  105. $this->selfDescription = null;
  106. }
  107. }
  108. #[Column(
  109. name : 'freshness_date',
  110. type : Types::DATETIME_MUTABLE,
  111. nullable: true
  112. )]
  113. private ?DateTime $freshnessDate; // Quelle: recurrent_job
  114. public function getFreshnessDate(): ?DateTime
  115. {
  116. return $this->freshnessDate;
  117. }
  118. public function setFreshnessDate(?DateTime $freshnessDate): void
  119. {
  120. $this->freshnessDate = $freshnessDate;
  121. }
  122. #[Column(
  123. name : 'jobofferer_profiles_id',
  124. type : Types::GUID,
  125. nullable: true
  126. )]
  127. private ?string $joboffererProfileId;
  128. public function getJoboffererProfileId(): ?string
  129. {
  130. return $this->joboffererProfileId;
  131. }
  132. public function setJoboffererProfileId(?string $jobofferererProfileId): void
  133. {
  134. $this->joboffererProfileId = $jobofferererProfileId;
  135. }
  136. #[Column(
  137. name : 'photo_filename',
  138. type : Types::STRING,
  139. length : 512,
  140. nullable: true
  141. )]
  142. // @NOTE: Value from RecurrentJob ->getProfilePhoto ->getFileName
  143. private ?string $photoFilename;
  144. public function getPhotoFilename(): ?string
  145. {
  146. return $this->photoFilename;
  147. }
  148. public function setPhotoFilename(?string $photoFilename): void
  149. {
  150. if (!is_null($photoFilename)) {
  151. $this->photoFilename = mb_substr($photoFilename, 0, 512);
  152. } else {
  153. $this->photoFilename = null;
  154. }
  155. }
  156. /** @var array<int>|null $careerLevels */
  157. #[Column(
  158. name : 'career_levels',
  159. type : Types::SIMPLE_ARRAY,
  160. nullable: true
  161. )]
  162. private ?array $careerLevels;
  163. /** @return array<int>|null */
  164. public function getCareerLevels(): ?array
  165. {
  166. return $this->careerLevels;
  167. }
  168. /**
  169. * @param array<int>|null $careerLevels
  170. */
  171. public function setCareerLevels(?array $careerLevels): void
  172. {
  173. $this->careerLevels = $careerLevels;
  174. }
  175. /** @var array<int>|null $employmentTypes */
  176. #[Column(
  177. name : 'employment_types',
  178. type : Types::SIMPLE_ARRAY,
  179. nullable: true
  180. )]
  181. private ?array $employmentTypes;
  182. /** @return int[]|null */
  183. public function getEmploymentTypes(): ?array
  184. {
  185. return $this->employmentTypes;
  186. }
  187. /** @param int[]|null $employmentTypes */
  188. public function setEmploymentTypes(?array $employmentTypes): void
  189. {
  190. $this->employmentTypes = $employmentTypes;
  191. }
  192. #[Column(
  193. name : 'integrated_external_partner_customer_id',
  194. type : Types::GUID,
  195. nullable: true
  196. )]
  197. private ?string $integratedExternalPartnerCustomerId;
  198. public function getIntegratedExternalPartnerCustomerId(): ?string
  199. {
  200. return $this->integratedExternalPartnerCustomerId;
  201. }
  202. public function setIntegratedExternalPartnerCustomerId(?string $integratedExternalPartnerCustomerId): void
  203. {
  204. $this->integratedExternalPartnerCustomerId = $integratedExternalPartnerCustomerId;
  205. }
  206. #[Column(
  207. name : 'internal_id',
  208. type : Types::STRING,
  209. length : 256,
  210. nullable: true
  211. )]
  212. private ?string $internalId;
  213. public function getInternalId(): ?string
  214. {
  215. return $this->internalId;
  216. }
  217. public function setInternalId(?string $internalId): void
  218. {
  219. if (!is_null($internalId)) {
  220. $this->internalId = mb_substr($internalId, 0, 256);
  221. } else {
  222. $this->internalId = null;
  223. }
  224. }
  225. #[Column(
  226. name : 'contact_phone',
  227. type : Types::STRING,
  228. length : 256,
  229. nullable: true
  230. )]
  231. private ?string $contactPhone;
  232. public function getContactPhone(): ?string
  233. {
  234. return $this->contactPhone;
  235. }
  236. public function setContactPhone(?string $contactPhone): void
  237. {
  238. if (!is_null($contactPhone)) {
  239. $this->contactPhone = $contactPhone;
  240. } else {
  241. $this->contactPhone = null;
  242. }
  243. }
  244. #[Column(
  245. type : Types::DATETIME_MUTABLE,
  246. nullable: false
  247. )]
  248. private DateTime $createdAt;
  249. public function getCreatedAt(): DateTime
  250. {
  251. return $this->createdAt;
  252. }
  253. public function setCreatedAt(DateTime $createdAt): void
  254. {
  255. $this->createdAt = $createdAt;
  256. }
  257. #[Column(
  258. name : 'external_partner_id',
  259. type : Types::INTEGER,
  260. nullable: true
  261. )]
  262. private ?int $externalPartnerId;
  263. public function setExternalPartnerId(?int $externalPartnerId): void
  264. {
  265. $this->externalPartnerId = $externalPartnerId;
  266. }
  267. public function getExternalPartnerId(): ?int
  268. {
  269. return $this->externalPartnerId;
  270. }
  271. #[Column(
  272. name : 'integrated_external_partner_customer_business_name',
  273. type : Types::STRING,
  274. length : 512,
  275. nullable: true
  276. )]
  277. private ?string $integratedExternalPartnerCustomerBusinessName;
  278. public function setIntegratedExternalPartnerCustomerBusinessName(?string $integratedExternalPartnerCustomerBusinessName): void
  279. {
  280. if (!is_null($integratedExternalPartnerCustomerBusinessName)) {
  281. $this->integratedExternalPartnerCustomerBusinessName = $integratedExternalPartnerCustomerBusinessName;
  282. } else {
  283. $this->integratedExternalPartnerCustomerBusinessName = null;
  284. }
  285. }
  286. public function getIntegratedExternalPartnerCustomerBusinessName(): ?string
  287. {
  288. return $this->integratedExternalPartnerCustomerBusinessName;
  289. }
  290. #[Column(
  291. name : 'has_dedicated_profile_photo',
  292. type : Types::BOOLEAN,
  293. nullable: false
  294. )]
  295. private bool $hasDedicatedProfilePhoto;
  296. public function setHasDedicatedProfilePhoto(bool $hasDedicatedProfilePhoto): void
  297. {
  298. $this->hasDedicatedProfilePhoto = $hasDedicatedProfilePhoto;
  299. }
  300. public function hasDedicatedProfilePhoto(): bool
  301. {
  302. return $this->hasDedicatedProfilePhoto;
  303. }
  304. #[Column(
  305. name : 'recurrentjob_can_be_applied_by_conversation_message',
  306. type : Types::BOOLEAN,
  307. nullable: false
  308. )]
  309. private bool $recurrentJobCanBeAppliedByConversationMessage;
  310. public function setRecurrentJobCanBeAppliedByConversationMessage(bool $recurrentJobCanBeAppliedByConversationMessage): void
  311. {
  312. $this->recurrentJobCanBeAppliedByConversationMessage = $recurrentJobCanBeAppliedByConversationMessage;
  313. }
  314. public function getRecurrentJobCanBeAppliedByConversationMessage(): bool
  315. {
  316. return $this->recurrentJobCanBeAppliedByConversationMessage;
  317. }
  318. #[Column(
  319. name : 'occupational_field_searchterm',
  320. type : Types::STRING,
  321. length : 256,
  322. nullable: true
  323. )]
  324. private ?string $occupationalFieldSearchterm;
  325. public function setOccupationalFieldSearchterm(?string $occupationalFieldSearchterm): void
  326. {
  327. if (!is_null($occupationalFieldSearchterm)) {
  328. $this->occupationalFieldSearchterm = mb_substr($occupationalFieldSearchterm, 0, 256);
  329. } else {
  330. $this->occupationalFieldSearchterm = null;
  331. }
  332. }
  333. public function getOccupationalFieldSearchterm(): ?string
  334. {
  335. return $this->occupationalFieldSearchterm;
  336. }
  337. #[Column(
  338. name : 'user_has_access_to_nonfree_jobofferer_features',
  339. type : Types::BOOLEAN,
  340. nullable: false
  341. )]
  342. private bool $userHasAccessToNonfreeJoboffererFeatures;
  343. public function setUserHasAccessToNonfreeJoboffererFeatures(bool $userHasAccessToNonfreeJoboffererFeatures): void
  344. {
  345. $this->userHasAccessToNonfreeJoboffererFeatures = $userHasAccessToNonfreeJoboffererFeatures;
  346. }
  347. public function getUserHasAccessToNonfreeJoboffererFeatures(): bool
  348. {
  349. return $this->userHasAccessToNonfreeJoboffererFeatures;
  350. }
  351. #[Column(
  352. name : 'profile_photo_uri',
  353. type : Types::STRING,
  354. length : 1024,
  355. nullable: true
  356. )]
  357. private ?string $profilePhotoUri;
  358. public function setProfilePhotoUri(?string $profilePhotoUri): void
  359. {
  360. if (!is_null($profilePhotoUri)) {
  361. $this->profilePhotoUri = mb_substr($profilePhotoUri, 0, 1024);
  362. } else {
  363. $this->profilePhotoUri = null;
  364. }
  365. }
  366. public function getProfilePhotoUri(): ?string
  367. {
  368. return $this->profilePhotoUri;
  369. }
  370. #[Column(
  371. name : 'recurrentjob_must_link_externally',
  372. type : Types::BOOLEAN,
  373. nullable: false
  374. )]
  375. private bool $recurrentJobMustLinkExternally;
  376. public function setRecurrentJobMustLinkExternally(bool $recurrentJobMustLinkExternally): void
  377. {
  378. $this->recurrentJobMustLinkExternally = $recurrentJobMustLinkExternally;
  379. }
  380. public function getRecurrentJobMustLinkExternally(): bool
  381. {
  382. return $this->recurrentJobMustLinkExternally;
  383. }
  384. #[Column(
  385. name : 'url_for_recurrentjob_that_must_link_externally',
  386. type : Types::TEXT,
  387. length : 65535,
  388. nullable: true
  389. )]
  390. private ?string $urlForRecurrentJobThatMustLinkExternally;
  391. public function setUrlForRecurrentJobThatMustLinkExternally(?string $urlForRecurrrentJobThatMustLinkExternally): void
  392. {
  393. if (!is_null($urlForRecurrrentJobThatMustLinkExternally)) {
  394. $this->urlForRecurrentJobThatMustLinkExternally = mb_substr($urlForRecurrrentJobThatMustLinkExternally, 0, 65535);
  395. } else {
  396. $this->urlForRecurrentJobThatMustLinkExternally = null;
  397. }
  398. }
  399. public function getUrlForRecurrentJobThatMustLinkExternally(): ?string
  400. {
  401. return $this->urlForRecurrentJobThatMustLinkExternally;
  402. }
  403. #[Column(
  404. name : 'jobofferer_profile_has_photo',
  405. type : Types::BOOLEAN,
  406. nullable: false
  407. )]
  408. private bool $joboffererProfileHasPhoto;
  409. public function setJoboffererProfileHasPhoto(bool $joboffererProfileHasPhoto): void
  410. {
  411. $this->joboffererProfileHasPhoto = $joboffererProfileHasPhoto;
  412. }
  413. public function getJoboffererProfileHasPhoto(): bool
  414. {
  415. return $this->joboffererProfileHasPhoto;
  416. }
  417. #[Column(
  418. name : 'jobofferer_profile_self_description_as_html',
  419. type : Types::BOOLEAN,
  420. nullable: false
  421. )]
  422. private bool $joboffererProfileSelfDescriptionAsHtml;
  423. public function setJoboffererProfileSelfDescriptionAsHtml(bool $joboffererProfileSelfDescriptionAsHtml): void
  424. {
  425. $this->joboffererProfileSelfDescriptionAsHtml = $joboffererProfileSelfDescriptionAsHtml;
  426. }
  427. public function getJoboffererProfileSelfDescriptionAsHtml(): bool
  428. {
  429. return $this->joboffererProfileSelfDescriptionAsHtml;
  430. }
  431. #[Column(
  432. name : 'recurrentjob_superior_salary',
  433. type : Types::BOOLEAN,
  434. nullable: false
  435. )]
  436. private bool $recurrentJobSuperiorSalary;
  437. public function setRecurrentJobSuperiorSalary(bool $recurrentJobSuperiorSalary): void
  438. {
  439. $this->recurrentJobSuperiorSalary = $recurrentJobSuperiorSalary;
  440. }
  441. public function getRecurrentJobSuperiorSalary(): bool
  442. {
  443. return $this->recurrentJobSuperiorSalary;
  444. }
  445. #[Column(
  446. name : 'jobofferer_profile_photo_file_name',
  447. type : Types::STRING,
  448. length : 512,
  449. nullable: true
  450. )]
  451. // @NOTE: JoboffererProfile -> getPhotoFileName
  452. private ?string $joboffererProfilePhotoFileName;
  453. public function setJoboffererProfilePhotoFileName(?string $joboffererProfilePhotoFileName): void
  454. {
  455. if (!is_null($joboffererProfilePhotoFileName)) {
  456. $this->joboffererProfilePhotoFileName = mb_substr($joboffererProfilePhotoFileName, 0, 512);
  457. } else {
  458. $this->joboffererProfilePhotoFileName = null;
  459. }
  460. }
  461. public function getJoboffererProfilePhotoFileName(): ?string
  462. {
  463. return $this->joboffererProfilePhotoFileName;
  464. }
  465. #[Column(
  466. name : 'user_has_active_jobofferer_membership',
  467. type : Types::BOOLEAN,
  468. nullable: false
  469. )]
  470. private bool $userHasActiveJoboffererMembership;
  471. public function setUserHasActiveJoboffererMembership(bool $userHasActiveJoboffererMembership): void
  472. {
  473. $this->userHasActiveJoboffererMembership = $userHasActiveJoboffererMembership;
  474. }
  475. public function getUserHasActiveJoboffererMembership(): bool
  476. {
  477. return $this->userHasActiveJoboffererMembership;
  478. }
  479. #[Column(
  480. name : 'profile_last_seen_at',
  481. type : Types::DATETIME_MUTABLE,
  482. nullable: true
  483. )]
  484. private ?DateTime $profileLastSeenAt;
  485. public function setProfileLastSeenAt(?DateTime $profileLastsSeenAt): void
  486. {
  487. $this->profileLastSeenAt = $profileLastsSeenAt;
  488. }
  489. public function getProfileLastSeenAt(): ?DateTime
  490. {
  491. return $this->profileLastSeenAt;
  492. }
  493. #[Column(
  494. name : 'recurrentjob_created_at',
  495. type : Types::DATETIME_MUTABLE,
  496. nullable: true
  497. )]
  498. private ?DateTime $recurrentJobCreatedAt;
  499. public function setRecurrentJobCreatedAt(?DateTime $recurrentJobCreatedAt): void
  500. {
  501. $this->recurrentJobCreatedAt = $recurrentJobCreatedAt;
  502. }
  503. public function getRecurrentJobCreatedAt(): ?DateTime
  504. {
  505. return $this->recurrentJobCreatedAt;
  506. }
  507. #[Column(
  508. name : 'users_id',
  509. type : Types::GUID,
  510. nullable: true
  511. )]
  512. private ?string $userId;
  513. public function setUserId(?string $userId): void
  514. {
  515. $this->userId = $userId;
  516. }
  517. public function getUserId(): ?string
  518. {
  519. return $this->userId;
  520. }
  521. /** @var array<bool[]>|null $workingTimes */
  522. #[Column(
  523. name : 'working_times',
  524. type : Types::JSON,
  525. nullable: true
  526. )]
  527. private ?array $workingTimes;
  528. /** @param array<bool[]>|null $workingTimes */
  529. public function setWorkingTimes(?array $workingTimes): void
  530. {
  531. $this->workingTimes = $workingTimes;
  532. }
  533. /** @return array<bool[]>|null */
  534. public function getWorkingTimes(): ?array
  535. {
  536. return $this->workingTimes;
  537. }
  538. }