src/Entity/Cvs/Jobs.php line 57

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Cvs;
  3. use App\Entity\Core\Users;
  4. use App\Entity\Core\Agencies;
  5. use Doctrine\DBAL\Types\Types;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  10. use Symfony\Component\HttpFoundation\File\File;
  11. use Symfony\Component\HttpFoundation\File\UploadedFile;
  12. use Vich\UploaderBundle\Entity\File as EmbeddedFile;
  13. use Vich\UploaderBundle\Templating\Helper\UploaderHelper;
  14. /**
  15. * Jobs - Offre d'emploi.
  16. *
  17. * ⚠️ LES INDEX SE DÉCLARENT ICI, MAIS NE SE CRÉENT PAS ICI.
  18. *
  19. * Cette annotation est la DÉFINITION du schéma : elle vit avec le code,
  20. * se relit, se compare. Elle n'exécute rien. Pour les appliquer :
  21. *
  22. * php bin/console doctrine:schema:update --dump-sql
  23. *
  24. * …puis on relit le SQL proposé et on joue ce qu'on veut. Jamais
  25. * `--force` : voir l'avertissement dans `config/packages/doctrine.yaml`.
  26. *
  27. * ⚠️ `idx_jobs_listing` NE SERT PAS LA LISTE PUBLIQUE.
  28. *
  29. * Il porte sur `created_at`, or les requêtes publiques trient par
  30. * `updated_at` (voir `PublicJobsController::queryJobs`). MySQL filtrait
  31. * donc sur `online` puis triait 80 000 lignes en mémoire à chaque page.
  32. * C'est le genre d'écart qu'on ne voit pas : l'index EXISTE, on le
  33. * croit utilisé.
  34. *
  35. * @ORM\Table(name="cvs_jobs", indexes={
  36. * @ORM\Index(name="idx_jobs_listing", columns={"online", "locale", "created_at"}),
  37. * @ORM\Index(name="idx_jobs_category", columns={"category"}),
  38. * @ORM\Index(name="idx_jobs_slug", columns={"slug"}),
  39. *
  40. * @ORM\Index(name="idx_jobs_online_updated", columns={"online", "updated_at"}),
  41. *
  42. * @ORM\Index(name="idx_jobs_city_ref", columns={"city_ref"}),
  43. * @ORM\Index(name="idx_jobs_city_slug", columns={"city_slug"}),
  44. * @ORM\Index(name="idx_jobs_area", columns={"area_code"}),
  45. * @ORM\Index(name="idx_jobs_trade_ref", columns={"trade_ref"}),
  46. *
  47. * @ORM\Index(name="idx_jobs_online_cityref", columns={"online", "city_ref"}),
  48. * @ORM\Index(name="idx_jobs_city_country", columns={"city", "country"})
  49. * })
  50. * @ORM\Entity(repositoryClass="App\Repository\Cvs\JobsRepository")
  51. * @ORM\HasLifecycleCallbacks()
  52. * @Vich\Uploadable
  53. */
  54. class Jobs
  55. {
  56. /**
  57. * @var integer
  58. *
  59. * @ORM\Column(name="id", type="integer")
  60. * @ORM\Id
  61. * @ORM\GeneratedValue(strategy="AUTO")
  62. */
  63. protected $id;
  64. /**
  65. * @var string
  66. *
  67. * @ORM\Column(name="created_at", type="datetime", nullable=true, options={"comment":"Date de création"})
  68. */
  69. private $createdAt;
  70. /**
  71. * @var string
  72. *
  73. * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"Date de mise à jour"})
  74. */
  75. private $updatedAt;
  76. /**
  77. * @var string
  78. *
  79. * @ORM\Column(name="jobtitle", type="string", length=255, nullable=true)
  80. */
  81. private $jobTitle;
  82. /**
  83. * @var string
  84. *
  85. * @ORM\Column(name="category", type="string", length=255, nullable=true)
  86. */
  87. private $category;
  88. /**
  89. * @var string
  90. *
  91. * @ORM\Column(name="employment_type", type="string", length=255, nullable=true)
  92. */
  93. private $employmentType;
  94. /**
  95. * @var string
  96. *
  97. * @ORM\Column(name="experience_level", type="string", length=255, nullable=true)
  98. */
  99. private $experienceLevel;
  100. /**
  101. * @var string
  102. *
  103. * @ORM\Column(name="remote_work", type="string", length=255, nullable=true)
  104. */
  105. private $remoteWork;
  106. /**
  107. * @var string
  108. *
  109. * @ORM\Column(name="company_name", type="string", length=255, nullable=true)
  110. */
  111. private $companyName;
  112. /**
  113. * @var string
  114. *
  115. * @ORM\Column(name="company_size", type="string", length=255, nullable=true)
  116. */
  117. private $companySize;
  118. /**
  119. * @var string
  120. *
  121. * @ORM\Column(name="short_title", type="text", nullable=true)
  122. */
  123. private $shortTitle;
  124. /**
  125. * @var string
  126. *
  127. * @ORM\Column(name="short_description", type="text", nullable=true)
  128. */
  129. private $shortDescription;
  130. /**
  131. * @var string
  132. *
  133. * @ORM\Column(name="address", type="string", length=255, nullable=true)
  134. */
  135. private $address;
  136. /**
  137. * @var string
  138. *
  139. * @ORM\Column(name="city", type="string", length=255, nullable=true)
  140. */
  141. private $city;
  142. /**
  143. * @var string
  144. *
  145. * @ORM\Column(name="zipcode", type="string", length=255, nullable=true)
  146. */
  147. private $zipcode;
  148. /**
  149. * @var string
  150. *
  151. * @ORM\Column(name="country", type="string", length=255, nullable=true)
  152. */
  153. private $country;
  154. /**
  155. * @var string
  156. *
  157. * @ORM\Column(name="website", type="string", length=255, nullable=true)
  158. */
  159. private $website;
  160. /**
  161. * @var string
  162. *
  163. * @ORM\Column(name="email", type="string", length=255, nullable=true)
  164. */
  165. private $email;
  166. /**
  167. * @var string
  168. *
  169. * @ORM\Column(name="phone", type="string", length=255, nullable=true)
  170. */
  171. private $phone;
  172. /**
  173. * @var string
  174. *
  175. * @ORM\Column(name="company_description", type="text", nullable=true)
  176. */
  177. private $companyDescription;
  178. /**
  179. * @var string
  180. *
  181. * @ORM\Column(name="required_skills", type="text", nullable=true)
  182. */
  183. private $requiredSkills;
  184. /**
  185. * @var string
  186. *
  187. * @ORM\Column(name="nice_to_have_skills", type="text", nullable=true)
  188. */
  189. private $niceToHaveSkills;
  190. /**
  191. * @var string
  192. *
  193. * @ORM\Column(name="job_summary", type="text", nullable=true)
  194. */
  195. private $jobSummary;
  196. /**
  197. * @var string
  198. *
  199. * @ORM\Column(name="key_responsabilities", type="text", nullable=true)
  200. */
  201. private $keyResponsabilities;
  202. /**
  203. * @var string
  204. *
  205. * @ORM\Column(name="requirements", type="text", nullable=true)
  206. */
  207. private $requirements;
  208. /**
  209. * @var string
  210. *
  211. * @ORM\Column(name="salary_min", type="integer", length=11, nullable=true)
  212. */
  213. private $salaryMin;
  214. /**
  215. * @var string
  216. *
  217. * @ORM\Column(name="salary_max", type="integer", length=11, nullable=true)
  218. */
  219. private $salaryMax;
  220. /**
  221. * @var string
  222. *
  223. * @ORM\Column(name="devise", type="string", length=255, nullable=true)
  224. */
  225. private $devise;
  226. /**
  227. * @var string
  228. *
  229. * @ORM\Column(name="salary_period", type="string", length=255, nullable=true)
  230. */
  231. private $salaryPeriod;
  232. /**
  233. * @var string
  234. *
  235. * @ORM\Column(name="benefits", type="text", nullable=true)
  236. */
  237. private $benefits;
  238. /**
  239. * @var string
  240. *
  241. * @ORM\Column(name="contact_name", type="string", length=255, nullable=true)
  242. */
  243. private $contactName;
  244. /**
  245. * @var string
  246. *
  247. * @ORM\Column(name="contact_email", type="string", length=255, nullable=true)
  248. */
  249. private $contactEmail;
  250. /**
  251. * @var string
  252. *
  253. * @ORM\Column(name="contact_url", type="string", length=255, nullable=true)
  254. */
  255. private $contactURL;
  256. /**
  257. * NOTE: This is not a mapped field of entity metadata, just a simple property.
  258. *
  259. * @Vich\UploadableField(mapping="cv_files", fileNameProperty="image.name", size="image.size", mimeType="image.mimeType", originalName="image.originalName", dimensions="image.dimensions")
  260. *
  261. * @var File|null
  262. */
  263. private $imageFile;
  264. /**
  265. * @ORM\Embedded(class="Vich\UploaderBundle\Entity\File")
  266. *
  267. * @var EmbeddedFile
  268. */
  269. private $image;
  270. /**
  271. * @var string
  272. *
  273. * @ORM\Column(name="online", type="boolean", nullable=true)
  274. */
  275. private $online;
  276. /**
  277. * @var \Users
  278. *
  279. * @ORM\ManyToOne(targetEntity="App\Entity\Core\Users")
  280. * @ORM\JoinColumns({
  281. * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true)
  282. * })
  283. */
  284. protected $user;
  285. /**
  286. * @var string
  287. *
  288. * @ORM\Column(name="slug", type="string", length=255, nullable=true)
  289. */
  290. private $slug;
  291. /**
  292. * @var string
  293. *
  294. * @ORM\Column(name="keywords", type="string", length=255, nullable=true)
  295. */
  296. private $keywords;
  297. /**
  298. * @var string
  299. *
  300. * @ORM\Column(name="locale", type="string", length=255, nullable=true)
  301. */
  302. private $locale;
  303. /**
  304. * @var string
  305. *
  306. * @ORM\Column(name="views", type="integer", length=11, nullable=true)
  307. */
  308. private $views;
  309. /**
  310. * ⚠️ EXPIRÉE ≠ DÉPUBLIÉE.
  311. *
  312. * `online = false` rend une 404 : les liens entrants meurent.
  313. * `isExpired = true` garde la page, avec un bandeau et des
  314. * suggestions — le visiteur comprend et repart avec autre chose.
  315. *
  316. * @var bool
  317. *
  318. * @ORM\Column(name="is_expired", type="boolean", options={"default":0})
  319. */
  320. private $isExpired = false;
  321. /**
  322. * ⚠️ LA RÉFÉRENCE PRIME SUR LE SLUG.
  323. *
  324. * Le slug suit le titre : renommer la ville le change, et le
  325. * rattachement pointe dans le vide — sans erreur, l'offre sort
  326. * simplement des filtres. La référence, elle, ne bouge jamais.
  327. *
  328. * Le slug reste : il est lisible dans un fichier d'import et sert
  329. * aux URL. L'un identifie, l'autre adresse.
  330. *
  331. * @var string|null
  332. *
  333. * @ORM\Column(name="city_ref", type="string", length=24, nullable=true)
  334. */
  335. private $cityRef;
  336. /**
  337. * @var string|null
  338. *
  339. * @ORM\Column(name="trade_ref", type="string", length=24, nullable=true)
  340. */
  341. private $tradeRef;
  342. /**
  343. * ⚠️ `city` RESTE LE TEXTE AFFICHÉ ; CELUI-CI SERT À FILTRER.
  344. *
  345. * « Remote/Hybrid (US-based) » porte une information que
  346. * « united-states » perdrait. Les deux cohabitent : l'un se lit,
  347. * l'autre se compare.
  348. *
  349. * @var string|null
  350. *
  351. * @ORM\Column(name="city_slug", type="string", length=190, nullable=true)
  352. */
  353. private $citySlug;
  354. /**
  355. * ⚠️ DÉRIVÉ DU SLUG, JAMAIS SAISI À LA MAIN.
  356. *
  357. * Le remplir indépendamment le ferait contredire le slug — une
  358. * offre à Paris rattachée à la Belgique, découverte des mois plus
  359. * tard en comptant les résultats d'un filtre.
  360. *
  361. * @var string|null
  362. *
  363. * @ORM\Column(name="area_code", type="string", length=8, nullable=true)
  364. */
  365. private $areaCode;
  366. /**
  367. * ⚠️ DISTINCT DE `online`.
  368. *
  369. * `online` = visible sur le site. `is_indexed` = les moteurs ont le
  370. * droit de référencer la fiche. Une offre confidentielle est en
  371. * ligne — accessible par son lien — mais non indexée.
  372. *
  373. * @var bool
  374. *
  375. * @ORM\Column(name="is_indexed", type="boolean", options={"default":1})
  376. */
  377. private $isIndexed = true;
  378. /**
  379. * @var string
  380. *
  381. * @ORM\Column(name="validation", type="boolean", nullable=true)
  382. */
  383. private $validation;
  384. /**
  385. * @var string
  386. *
  387. * @ORM\Column(name="verification", type="boolean", nullable=true)
  388. */
  389. private $verification;
  390. /**
  391. * @var \Enterprises
  392. *
  393. * @ORM\ManyToOne(targetEntity="App\Entity\Cvs\Enterprises")
  394. * @ORM\JoinColumns({
  395. * @ORM\JoinColumn(name="enterprise_id", referencedColumnName="id", nullable=true)
  396. * })
  397. */
  398. protected $enterprise;
  399. /**
  400. * @var string
  401. *
  402. * @ORM\Column(name="websearch", type="boolean", nullable=true)
  403. */
  404. private $websearch;
  405. /**
  406. * Paiement effectué pour cette offre.
  407. *
  408. * @ORM\Column(name="paid", type="boolean", nullable=true, options={"default": false})
  409. */
  410. private $paid = false;
  411. /**
  412. * ID de transaction unique lié au paiement (anti-doublon).
  413. * - Stripe : pi_xxx
  414. * - RevenueCat : transactionIdentifier
  415. *
  416. * @ORM\Column(name="paid_transaction_id", type="string", length=255, nullable=true, unique=true)
  417. */
  418. private $paidTransactionId;
  419. /**
  420. * Provider utilisé pour le paiement de cette offre.
  421. *
  422. * @ORM\Column(name="paid_provider", type="string", length=50, nullable=true)
  423. */
  424. private $paidProvider; // 'stripe' | 'revenuecat' | 'premium'
  425. public function __construct()
  426. {
  427. $this->image = new \Vich\UploaderBundle\Entity\File();
  428. }
  429. /**
  430. * @ORM\PrePersist
  431. */
  432. public function setCreatedAtValue(): void
  433. {
  434. $this->setCreatedAt(new \DateTime("now"));
  435. $this->setUpdatedAt(new \DateTime("now"));
  436. }
  437. /**
  438. * @ORM\PreUpdate
  439. */
  440. public function setUpdatedAtValue(): void
  441. {
  442. $this->setUpdatedAt(new \DateTime("now"));
  443. }
  444. public function __toString()
  445. {
  446. return (string)$this->id;
  447. }
  448. /**
  449. * If manually uploading a file (i.e. not using Symfony Form) ensure an instance
  450. * of 'UploadedFile' is injected into this setter to trigger the update. If this
  451. * bundle's configuration parameter 'inject_on_load' is set to 'true' this setter
  452. * must be able to accept an instance of 'File' as the bundle will inject one here
  453. * during Doctrine hydration.
  454. *
  455. * @param File|UploadedFile|null $imageFile
  456. */
  457. public function setImageFile(?File $imageFile = null)
  458. {
  459. $this->imageFile = $imageFile;
  460. if (null !== $imageFile) {
  461. // It is required that at least one field changes if you are using doctrine
  462. // otherwise the event listeners won't be called and the file is lost
  463. $this->setUpdatedAt(new \DateTime("now"));
  464. }
  465. }
  466. public function getImageFile(): ?File
  467. {
  468. return $this->imageFile;
  469. }
  470. public function setImage(EmbeddedFile $image): void
  471. {
  472. $this->image = $image;
  473. }
  474. public function getImage(): ?EmbeddedFile
  475. {
  476. return $this->image;
  477. }
  478. public function getImageBase64(?string $projectDir = null): ?string
  479. {
  480. if (!$this->image || !$this->image->getName()) {
  481. return null;
  482. }
  483. if (!$projectDir) {
  484. return null; // ou throw new \Exception('Project dir required');
  485. }
  486. $filePath = $projectDir . '/files/cvs/' . $this->image->getName();
  487. if (!file_exists($filePath)) {
  488. return null;
  489. }
  490. $imageData = file_get_contents($filePath);
  491. $mimeType = $this->image->getMimeType() ?? mime_content_type($filePath);
  492. return 'data:' . $mimeType . ';base64,' . base64_encode($imageData);
  493. }
  494. public function getId(): ?int
  495. {
  496. return $this->id;
  497. }
  498. public function getCreatedAt(): ?\DateTimeInterface
  499. {
  500. return $this->createdAt;
  501. }
  502. public function setCreatedAt(?\DateTimeInterface $createdAt): static
  503. {
  504. $this->createdAt = $createdAt;
  505. return $this;
  506. }
  507. public function getUpdatedAt(): ?\DateTimeInterface
  508. {
  509. return $this->updatedAt;
  510. }
  511. public function setUpdatedAt(?\DateTimeInterface $updatedAt): static
  512. {
  513. $this->updatedAt = $updatedAt;
  514. return $this;
  515. }
  516. public function getJobTitle(): ?string
  517. {
  518. return $this->jobTitle;
  519. }
  520. public function setJobTitle(?string $jobTitle): static
  521. {
  522. $this->jobTitle = $jobTitle;
  523. return $this;
  524. }
  525. public function getCategory(): ?string
  526. {
  527. return $this->category;
  528. }
  529. public function setCategory(?string $category): static
  530. {
  531. $this->category = $category;
  532. return $this;
  533. }
  534. public function getEmploymentType(): ?string
  535. {
  536. return $this->employmentType;
  537. }
  538. public function setEmploymentType(?string $employmentType): static
  539. {
  540. $this->employmentType = $employmentType;
  541. return $this;
  542. }
  543. public function getExperienceLevel(): ?string
  544. {
  545. return $this->experienceLevel;
  546. }
  547. public function setExperienceLevel(?string $experienceLevel): static
  548. {
  549. $this->experienceLevel = $experienceLevel;
  550. return $this;
  551. }
  552. public function getRemoteWork(): ?string
  553. {
  554. return $this->remoteWork;
  555. }
  556. public function setRemoteWork(?string $remoteWork): static
  557. {
  558. $this->remoteWork = $remoteWork;
  559. return $this;
  560. }
  561. public function getCompanyName(): ?string
  562. {
  563. return $this->companyName;
  564. }
  565. public function setCompanyName(?string $companyName): static
  566. {
  567. $this->companyName = $companyName;
  568. return $this;
  569. }
  570. public function getAddress(): ?string
  571. {
  572. return $this->address;
  573. }
  574. public function setAddress(?string $address): static
  575. {
  576. $this->address = $address;
  577. return $this;
  578. }
  579. public function getCity(): ?string
  580. {
  581. return $this->city;
  582. }
  583. public function setCity(?string $city): static
  584. {
  585. $this->city = $city;
  586. return $this;
  587. }
  588. public function getZipcode(): ?string
  589. {
  590. return $this->zipcode;
  591. }
  592. public function setZipcode(?string $zipcode): static
  593. {
  594. $this->zipcode = $zipcode;
  595. return $this;
  596. }
  597. public function getCountry(): ?string
  598. {
  599. return $this->country;
  600. }
  601. public function setCountry(?string $country): static
  602. {
  603. $this->country = $country;
  604. return $this;
  605. }
  606. public function getWebsite(): ?string
  607. {
  608. return $this->website;
  609. }
  610. public function setWebsite(?string $website): static
  611. {
  612. $this->website = $website;
  613. return $this;
  614. }
  615. public function getEmail(): ?string
  616. {
  617. return $this->email;
  618. }
  619. public function setEmail(?string $email): static
  620. {
  621. $this->email = $email;
  622. return $this;
  623. }
  624. public function getPhone(): ?string
  625. {
  626. return $this->phone;
  627. }
  628. public function setPhone(?string $phone): static
  629. {
  630. $this->phone = $phone;
  631. return $this;
  632. }
  633. public function getCompanyDescription(): ?string
  634. {
  635. return $this->companyDescription;
  636. }
  637. public function setCompanyDescription(?string $companyDescription): static
  638. {
  639. $this->companyDescription = $companyDescription;
  640. return $this;
  641. }
  642. public function getRequiredSkills(): ?string
  643. {
  644. return $this->requiredSkills;
  645. }
  646. public function setRequiredSkills(?string $requiredSkills): static
  647. {
  648. $this->requiredSkills = $requiredSkills;
  649. return $this;
  650. }
  651. public function getNiceToHaveSkills(): ?string
  652. {
  653. return $this->niceToHaveSkills;
  654. }
  655. public function setNiceToHaveSkills(?string $niceToHaveSkills): static
  656. {
  657. $this->niceToHaveSkills = $niceToHaveSkills;
  658. return $this;
  659. }
  660. public function getJobSummary(): ?string
  661. {
  662. return $this->jobSummary;
  663. }
  664. public function setJobSummary(?string $jobSummary): static
  665. {
  666. $this->jobSummary = $jobSummary;
  667. return $this;
  668. }
  669. public function getKeyResponsabilities(): ?string
  670. {
  671. return $this->keyResponsabilities;
  672. }
  673. public function setKeyResponsabilities(?string $keyResponsabilities): static
  674. {
  675. $this->keyResponsabilities = $keyResponsabilities;
  676. return $this;
  677. }
  678. public function getRequirements(): ?string
  679. {
  680. return $this->requirements;
  681. }
  682. public function setRequirements(?string $requirements): static
  683. {
  684. $this->requirements = $requirements;
  685. return $this;
  686. }
  687. public function getSalaryMin(): ?int
  688. {
  689. return $this->salaryMin;
  690. }
  691. public function setSalaryMin(?int $salaryMin): static
  692. {
  693. $this->salaryMin = $salaryMin;
  694. return $this;
  695. }
  696. public function getSalaryMax(): ?int
  697. {
  698. return $this->salaryMax;
  699. }
  700. public function setSalaryMax(?int $salaryMax): static
  701. {
  702. $this->salaryMax = $salaryMax;
  703. return $this;
  704. }
  705. public function getDevise(): ?string
  706. {
  707. return $this->devise;
  708. }
  709. public function setDevise(?string $devise): static
  710. {
  711. $this->devise = $devise;
  712. return $this;
  713. }
  714. public function getSalaryPeriod(): ?string
  715. {
  716. return $this->salaryPeriod;
  717. }
  718. public function setSalaryPeriod(?string $salaryPeriod): static
  719. {
  720. $this->salaryPeriod = $salaryPeriod;
  721. return $this;
  722. }
  723. public function getBenefits(): ?string
  724. {
  725. return $this->benefits;
  726. }
  727. public function setBenefits(?string $benefits): static
  728. {
  729. $this->benefits = $benefits;
  730. return $this;
  731. }
  732. public function getContactName(): ?string
  733. {
  734. return $this->contactName;
  735. }
  736. public function setContactName(?string $contactName): static
  737. {
  738. $this->contactName = $contactName;
  739. return $this;
  740. }
  741. public function getContactEmail(): ?string
  742. {
  743. return $this->contactEmail;
  744. }
  745. public function setContactEmail(?string $contactEmail): static
  746. {
  747. $this->contactEmail = $contactEmail;
  748. return $this;
  749. }
  750. public function getContactURL(): ?string
  751. {
  752. return $this->contactURL;
  753. }
  754. public function setContactURL(?string $contactURL): static
  755. {
  756. $this->contactURL = $contactURL;
  757. return $this;
  758. }
  759. public function isOnline(): ?bool
  760. {
  761. return $this->online;
  762. }
  763. public function setOnline(?bool $online): static
  764. {
  765. $this->online = $online;
  766. return $this;
  767. }
  768. public function getUser(): ?Users
  769. {
  770. return $this->user;
  771. }
  772. public function setUser(?Users $user): static
  773. {
  774. $this->user = $user;
  775. return $this;
  776. }
  777. public function getSlug(): ?string
  778. {
  779. return $this->slug;
  780. }
  781. public function setSlug(?string $slug): static
  782. {
  783. $this->slug = $slug;
  784. return $this;
  785. }
  786. public function getLocale(): ?string
  787. {
  788. return $this->locale;
  789. }
  790. public function setLocale(?string $locale): static
  791. {
  792. $this->locale = $locale;
  793. return $this;
  794. }
  795. public function getEnterprise(): ?Enterprises
  796. {
  797. return $this->enterprise;
  798. }
  799. public function setEnterprise(?Enterprises $enterprise): static
  800. {
  801. $this->enterprise = $enterprise;
  802. return $this;
  803. }
  804. public function getCompanySize(): ?string
  805. {
  806. return $this->companySize;
  807. }
  808. public function setCompanySize(?string $companySize): static
  809. {
  810. $this->companySize = $companySize;
  811. return $this;
  812. }
  813. public function isValidation(): ?bool
  814. {
  815. return $this->validation;
  816. }
  817. public function setValidation(?bool $validation): static
  818. {
  819. $this->validation = $validation;
  820. return $this;
  821. }
  822. public function getShortTitle(): ?string
  823. {
  824. return $this->shortTitle;
  825. }
  826. public function setShortTitle(?string $shortTitle): static
  827. {
  828. $this->shortTitle = $shortTitle;
  829. return $this;
  830. }
  831. public function getShortDescription(): ?string
  832. {
  833. return $this->shortDescription;
  834. }
  835. public function setShortDescription(?string $shortDescription): static
  836. {
  837. $this->shortDescription = $shortDescription;
  838. return $this;
  839. }
  840. public function getViews(): ?int
  841. {
  842. return $this->views;
  843. }
  844. public function setViews(?int $views): static
  845. {
  846. $this->views = $views;
  847. return $this;
  848. }
  849. public function isVerification(): ?bool
  850. {
  851. return $this->verification;
  852. }
  853. public function setVerification(?bool $verification): static
  854. {
  855. $this->verification = $verification;
  856. return $this;
  857. }
  858. public function isWebsearch(): ?bool
  859. {
  860. return $this->websearch;
  861. }
  862. public function setWebsearch(?bool $websearch): static
  863. {
  864. $this->websearch = $websearch;
  865. return $this;
  866. }
  867. public function getKeywords(): ?string
  868. {
  869. return $this->keywords;
  870. }
  871. public function setKeywords(?string $keywords): static
  872. {
  873. $this->keywords = $keywords;
  874. return $this;
  875. }
  876. public function isPaid(): ?bool { return $this->paid; }
  877. public function setPaid(?bool $paid): static { $this->paid = $paid; return $this; }
  878. public function getPaidTransactionId(): ?string { return $this->paidTransactionId; }
  879. public function setPaidTransactionId(?string $id): static { $this->paidTransactionId = $id; return $this; }
  880. public function getPaidProvider(): ?string { return $this->paidProvider; }
  881. public function setPaidProvider(?string $provider): static { $this->paidProvider = $provider; return $this; }
  882. public function isIndexed(): bool
  883. {
  884. return (bool) $this->isIndexed;
  885. }
  886. /* Nommé `setIndexed` pour s'accorder à `isIndexed` : la conversion
  887. automatique du contrôleur dérive les deux du même radical. */
  888. public function setIndexed(bool $v): self
  889. {
  890. $this->isIndexed = $v;
  891. return $this;
  892. }
  893. public function getCitySlug(): ?string
  894. {
  895. return $this->citySlug;
  896. }
  897. public function setCitySlug(?string $v): self
  898. {
  899. $this->citySlug = $v;
  900. return $this;
  901. }
  902. public function getAreaCode(): ?string
  903. {
  904. return $this->areaCode;
  905. }
  906. public function setAreaCode(?string $v): self
  907. {
  908. $this->areaCode = $v;
  909. return $this;
  910. }
  911. public function getCityRef(): ?string
  912. {
  913. return $this->cityRef;
  914. }
  915. public function setCityRef(?string $v): self
  916. {
  917. $this->cityRef = $v;
  918. return $this;
  919. }
  920. public function getTradeRef(): ?string
  921. {
  922. return $this->tradeRef;
  923. }
  924. public function setTradeRef(?string $v): self
  925. {
  926. $this->tradeRef = $v;
  927. return $this;
  928. }
  929. public function isExpired(): bool
  930. {
  931. return (bool) $this->isExpired;
  932. }
  933. public function setExpired(bool $v): self
  934. {
  935. $this->isExpired = $v;
  936. return $this;
  937. }
  938. }