src/Entity/Cvs/KeywordsLandingJobs.php line 25

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. * Keywords Landing Jobs
  16. *
  17. * @ORM\Table("cvs_keywordslandingjobs")
  18. * @ORM\Entity(repositoryClass="App\Repository\Cvs\KeywordsLandingJobsRepository")
  19. * @ORM\HasLifecycleCallbacks()
  20. * @Vich\Uploadable
  21. */
  22. class KeywordsLandingJobs
  23. {
  24. /**
  25. * @var integer
  26. *
  27. * @ORM\Column(name="id", type="integer")
  28. * @ORM\Id
  29. * @ORM\GeneratedValue(strategy="AUTO")
  30. */
  31. protected $id;
  32. /**
  33. * @var string
  34. *
  35. * @ORM\Column(name="created_at", type="datetime", nullable=true, options={"comment":"Date de création"})
  36. */
  37. private $createdAt;
  38. /**
  39. * @var string
  40. *
  41. * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"Date de mise à jour"})
  42. */
  43. private $updatedAt;
  44. /**
  45. * Mot-clé utilisé pour la recherche réelle (data-search, ex: "Immobilier", "fullstack")
  46. *
  47. * @var string
  48. *
  49. * @ORM\Column(name="search_keyword", type="string", length=255, nullable=true)
  50. */
  51. private $searchKeyword;
  52. /**
  53. * Label affiché dans le tag populaire et l'animation (ex: "Agent immobilier", "Fullstack Developer")
  54. *
  55. * @var string
  56. *
  57. * @ORM\Column(name="label", type="string", length=255, nullable=true)
  58. */
  59. private $label;
  60. /**
  61. * Icône/emoji affichée devant le label (ex: "🏠", "💻", "⚖️")
  62. *
  63. * @var string
  64. *
  65. * @ORM\Column(name="icon", type="string", length=50, nullable=true)
  66. */
  67. private $icon;
  68. /**
  69. * Ancien champ keywords conservé pour rétrocompatibilité
  70. *
  71. * @var string
  72. *
  73. * @ORM\Column(name="keywords", type="string", length=255, nullable=true)
  74. */
  75. private $keywords;
  76. /**
  77. * Locale pour les homepages (fr, en). NULL si associé à une landing page.
  78. *
  79. * @var string
  80. *
  81. * @ORM\Column(name="locale", type="string", length=11, nullable=true)
  82. */
  83. private $locale;
  84. /**
  85. * Landing page associée. NULL si c'est pour la homepage.
  86. *
  87. * @var \LandingJobs
  88. *
  89. * @ORM\ManyToOne(targetEntity="App\Entity\Cvs\LandingJobs")
  90. * @ORM\JoinColumns({
  91. * @ORM\JoinColumn(name="landing_jobs", referencedColumnName="id", nullable=true)
  92. * })
  93. */
  94. protected $landing;
  95. /**
  96. * Ordre d'affichage
  97. *
  98. * @var integer
  99. *
  100. * @ORM\Column(name="position", type="integer", nullable=true, options={"default":0})
  101. */
  102. private $position = 0;
  103. public function __construct()
  104. {
  105. }
  106. /**
  107. * @ORM\PrePersist
  108. */
  109. public function setCreatedAtValue(): void
  110. {
  111. $this->setCreatedAt(new \DateTime("now"));
  112. $this->setUpdatedAt(new \DateTime("now"));
  113. }
  114. /**
  115. * @ORM\PreUpdate
  116. */
  117. public function setUpdatedAtValue(): void
  118. {
  119. $this->setUpdatedAt(new \DateTime("now"));
  120. }
  121. public function __toString()
  122. {
  123. return $this->label ?? (string)$this->id;
  124. }
  125. public function getId(): ?int
  126. {
  127. return $this->id;
  128. }
  129. public function getCreatedAt(): ?\DateTimeInterface
  130. {
  131. return $this->createdAt;
  132. }
  133. public function setCreatedAt(?\DateTimeInterface $createdAt): static
  134. {
  135. $this->createdAt = $createdAt;
  136. return $this;
  137. }
  138. public function getUpdatedAt(): ?\DateTimeInterface
  139. {
  140. return $this->updatedAt;
  141. }
  142. public function setUpdatedAt(?\DateTimeInterface $updatedAt): static
  143. {
  144. $this->updatedAt = $updatedAt;
  145. return $this;
  146. }
  147. public function getSearchKeyword(): ?string
  148. {
  149. return $this->searchKeyword;
  150. }
  151. public function setSearchKeyword(?string $searchKeyword): static
  152. {
  153. $this->searchKeyword = $searchKeyword;
  154. return $this;
  155. }
  156. public function getLabel(): ?string
  157. {
  158. return $this->label;
  159. }
  160. public function setLabel(?string $label): static
  161. {
  162. $this->label = $label;
  163. return $this;
  164. }
  165. public function getIcon(): ?string
  166. {
  167. return $this->icon;
  168. }
  169. public function setIcon(?string $icon): static
  170. {
  171. $this->icon = $icon;
  172. return $this;
  173. }
  174. public function getKeywords(): ?string
  175. {
  176. return $this->keywords;
  177. }
  178. public function setKeywords(?string $keywords): static
  179. {
  180. $this->keywords = $keywords;
  181. return $this;
  182. }
  183. public function getLocale(): ?string
  184. {
  185. return $this->locale;
  186. }
  187. public function setLocale(?string $locale): static
  188. {
  189. $this->locale = $locale;
  190. return $this;
  191. }
  192. public function getLanding(): ?LandingJobs
  193. {
  194. return $this->landing;
  195. }
  196. public function setLanding(?LandingJobs $landing): static
  197. {
  198. $this->landing = $landing;
  199. return $this;
  200. }
  201. public function getPosition(): ?int
  202. {
  203. return $this->position;
  204. }
  205. public function setPosition(?int $position): static
  206. {
  207. $this->position = $position;
  208. return $this;
  209. }
  210. }