Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
716cf56cb2.url-de-test.ws
/
htdocs_old
/
src
/
Entity
/
/srv/data/web/vhosts/716cf56cb2.url-de-test.ws/htdocs_old/src/Entity/Offer.php
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity(repositoryClass="App\Repository\OfferRepository") */ class Offer { /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $title; /** * @ORM\Column(type="string", length=255) */ private $contract; /** * @ORM\Column(type="string", length=255) */ private $region; /** * @ORM\Column(type="string", length=255) */ private $type; /** * @ORM\Column(type="string", length=255) */ private $uniqueCode; /** * @ORM\Column(type="string", length=255) */ private $contactName; /** * @ORM\Column(type="string", length=255) * @Assert\Email */ private $contactEmail; /** * @ORM\Column(type="text") */ private $description; /** * @ORM\Column(type="datetime") */ private $createdAt; /** * @ORM\Column(type="datetime") */ private $updatedAt; /** * @ORM\Column(type="boolean") */ private $isActive; /** * @ORM\ManyToOne(targetEntity="App\Entity\Establishment", inversedBy="offers") */ private $establishment; private $rand; public function __construct() { $this->isActive = true; $this->createdAt = new \DateTime(); $this->updatedAt = new \DateTime(); $this->uniqueCode = $this->randCode(substr('Emploi', 0, 3)); $this->region = 'Ile-de-France'; } public function getId(): ?int { return $this->id; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): self { $this->title = $title; return $this; } public function getContract(): ?string { return $this->contract; } public function setContract(string $contract): self { $this->contract = $contract; return $this; } public function getRegion(): ?string { return $this->region; } public function setRegion(string $region): self { $this->region = $region; return $this; } public function getType(): ?string { return $this->type; } public function setType(string $type): self { $this->type = $type; return $this; } public function getUniqueCode(): ?string { return $this->uniqueCode; } public function setUniqueCode(string $uniqueCode): self { $this->uniqueCode = $uniqueCode; return $this; } public function getContactName(): ?string { return $this->contactName; } public function setContactName(string $contactName): self { $this->contactName = $contactName; return $this; } public function getContactEmail(): ?string { return $this->contactEmail; } public function setContactEmail(string $contactEmail): self { $this->contactEmail = $contactEmail; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): self { $this->description = $description; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } public function getIsActive(): ?bool { return $this->isActive; } public function setIsActive(bool $isActive): self { $this->isActive = $isActive; return $this; } public function getEstablishment(): ?Establishment { return $this->establishment; } public function setEstablishment(?Establishment $establishment): self { $this->establishment = $establishment; return $this; } public function randCode(string $entityName) { $result = $this->rand; for ($i = 0; $i<6; $i++) { $result .= \mt_rand(0,9); } return $entityName.$result; } }