src/Entity/OfferAlert.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OfferAlertRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=OfferAlertRepository::class)
  8.  */
  9. class OfferAlert
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=190, nullable=true)
  19.      */
  20.     private $keyword;
  21.     /**
  22.      * @ORM\Column(type="string", length=190, nullable=true)
  23.      */
  24.     private $localisation;
  25.     /**
  26.      * @ORM\Column(type="string", length=190, nullable=true)
  27.      */
  28.     private $contrats;
  29.     /**
  30.      * @return mixed
  31.      */
  32.     public function getContrats()
  33.     {
  34.         return $this->contrats;
  35.     }
  36.     /**
  37.      * @param mixed $contrats
  38.      */
  39.     public function setContrats($contrats): self
  40.     {
  41.         $this->contrats $contrats;
  42.         return $this;
  43.     }
  44.     /**
  45.      * @ORM\Column(type="string", length=195, nullable=true)
  46.      */
  47.     private $remote;
  48.     /**
  49.      * @ORM\Column(type="integer", nullable=true)
  50.      */
  51.     private $min_tjm;
  52.     // ajout un champ salaire min
  53.     /**
  54.      * @ORM\Column(type="integer", nullable=true)
  55.      */
  56.     private $min_salaire;
  57.     /**
  58.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="offerAlerts")
  59.      * @ORM\JoinColumn(nullable=false)
  60.      */
  61.     private $user;
  62.     /**
  63.      * @ORM\Column(type="datetime", nullable=true)
  64.      */
  65.     private $lastSend;
  66.     public function __construct()
  67.     {
  68.         $this->lastSend = new \DateTime();
  69.     }
  70.     public function getId(): ?int
  71.     {
  72.         return $this->id;
  73.     }
  74.     public function getKeyword(): ?string
  75.     {
  76.         return $this->keyword;
  77.     }
  78.     public function setKeyword(?string $keyword): self
  79.     {
  80.         $this->keyword $keyword;
  81.         return $this;
  82.     }
  83.     public function getLocalisation(): ?string
  84.     {
  85.         return $this->localisation;
  86.     }
  87.     public function setLocalisation(?string $localisation): self
  88.     {
  89.         $this->localisation $localisation;
  90.         return $this;
  91.     }
  92.     public function getRemote(): ?string
  93.     {
  94.         return $this->remote;
  95.     }
  96.     public function setRemote(?string $remote): self
  97.     {
  98.         $this->remote $remote;
  99.         return $this;
  100.     }
  101.     public function getMinTjm(): ?int
  102.     {
  103.         return $this->min_tjm;
  104.     }
  105.     public function setMinTjm(?int $min_tjm): self
  106.     {
  107.         $this->min_tjm $min_tjm;
  108.         return $this;
  109.     }
  110.     // getter et setter pour le salaire min
  111.     public function getMinSalaire(): ?int
  112.     {
  113.         return $this->min_salaire;
  114.     }
  115.     public function setMinSalaire(?int $min_salaire): self
  116.     {
  117.         $this->min_salaire $min_salaire;
  118.         return $this;
  119.     }
  120.     public function getUser(): ?User
  121.     {
  122.         return $this->user;
  123.     }
  124.     public function setUser(?User $user): self
  125.     {
  126.         $this->user $user;
  127.         return $this;
  128.     }
  129.     public function getKeywordArray(): array
  130.     {
  131.         return explode(', '$this->getKeyword());
  132.     }
  133.     public function getLocalisationArray(): array
  134.     {
  135.         return explode(', '$this->getLocalisation());
  136.     }
  137.     public function getLastSend(): ?\DateTimeInterface
  138.     {
  139.         return $this->lastSend;
  140.     }
  141.     public function setLastSend(?\DateTimeInterface $lastSend): self
  142.     {
  143.         $this->lastSend $lastSend;
  144.         return $this;
  145.     }
  146. }