src/Entity/OffreEmploi.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OffreEmploiRepository;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassOffreEmploiRepository::class)]
  7. class OffreEmploi
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length255nullabletrue)]
  14.     private $titre;
  15.     #[ORM\Column(type'text'nullabletrue)]
  16.     private $description;
  17.     #[ORM\ManyToOne(targetEntityVille::class, inversedBy'offreEmplois')]
  18.     private $ville;
  19.     #[ORM\Column(type'string'length255nullabletrue)]
  20.     private $nomEntreprise;
  21.     #[ORM\Column(type'datetime')]
  22.     private $created_at;
  23.     #[ORM\Column(type'datetime')]
  24.     private $updated_at;
  25.     public function __construct()
  26.     {
  27.         $this->created_at = new DateTime('now');
  28.         $this->updated_at = new DateTime('now');
  29.     }
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getTitre(): ?string
  35.     {
  36.         return $this->titre;
  37.     }
  38.     public function setTitre(?string $titre): self
  39.     {
  40.         $this->titre $titre;
  41.         return $this;
  42.     }
  43.     public function getDescription(): ?string
  44.     {
  45.         return $this->description;
  46.     }
  47.     public function setDescription(?string $description): self
  48.     {
  49.         $this->description $description;
  50.         return $this;
  51.     }
  52.     public function getVille(): ?Ville
  53.     {
  54.         return $this->ville;
  55.     }
  56.     public function setVille(?Ville $ville): self
  57.     {
  58.         $this->ville $ville;
  59.         return $this;
  60.     }
  61.     public function getNomEntreprise(): ?string
  62.     {
  63.         return $this->nomEntreprise;
  64.     }
  65.     public function setNomEntreprise(?string $nomEntreprise): self
  66.     {
  67.         $this->nomEntreprise $nomEntreprise;
  68.         return $this;
  69.     }
  70.     public function getCreatedAt(): ?\DateTimeInterface
  71.     {
  72.         return $this->created_at;
  73.     }
  74.     public function setCreatedAt(\DateTimeInterface $created_at): self
  75.     {
  76.         $this->created_at $created_at;
  77.         return $this;
  78.     }
  79.     public function getUpdatedAt(): ?\DateTimeInterface
  80.     {
  81.         return $this->updated_at;
  82.     }
  83.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  84.     {
  85.         $this->updated_at $updated_at;
  86.         return $this;
  87.     }
  88. }