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=195, nullable=true)
  27.      */
  28.     private $remote;
  29.     /**
  30.      * @ORM\Column(type="integer", nullable=true)
  31.      */
  32.     private $min_tjm;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="offerAlerts")
  35.      * @ORM\JoinColumn(nullable=false)
  36.      */
  37.     private $user;
  38.     /**
  39.      * @ORM\Column(type="datetime", nullable=true)
  40.      */
  41.     private $lastSend;
  42.     /**
  43.      * @ORM\Column(type="string", length=50, nullable=true)
  44.      */
  45.     private $typeSearch;
  46.     /**
  47.      * @ORM\Column(type="json", nullable=true)
  48.      */
  49.     private $year_requireds = [];
  50.     public function __construct()
  51.     {
  52.         $this->lastSend = new \DateTime();
  53.     }
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getKeyword(): ?string
  59.     {
  60.         return $this->keyword;
  61.     }
  62.     public function setKeyword(?string $keyword): self
  63.     {
  64.         $this->keyword $keyword;
  65.         return $this;
  66.     }
  67.     public function getLocalisation(): ?string
  68.     {
  69.         return $this->localisation;
  70.     }
  71.     public function setLocalisation(?string $localisation): self
  72.     {
  73.         $this->localisation $localisation;
  74.         return $this;
  75.     }
  76.     public function getRemote(): ?string
  77.     {
  78.         return $this->remote;
  79.     }
  80.     public function setRemote(?string $remote): self
  81.     {
  82.         $this->remote $remote;
  83.         return $this;
  84.     }
  85.     public function getMinTjm(): ?int
  86.     {
  87.         return $this->min_tjm;
  88.     }
  89.     public function setMinTjm(?int $min_tjm): self
  90.     {
  91.         $this->min_tjm $min_tjm;
  92.         return $this;
  93.     }
  94.     public function getUser(): ?User
  95.     {
  96.         return $this->user;
  97.     }
  98.     public function setUser(?User $user): self
  99.     {
  100.         $this->user $user;
  101.         return $this;
  102.     }
  103.     public function getKeywordArray(): array
  104.     {
  105.         return explode(', '$this->getKeyword());
  106.     }
  107.     public function getLocalisationArray(): array
  108.     {
  109.         return explode(', '$this->getLocalisation());
  110.     }
  111.     public function getLastSend(): ?\DateTimeInterface
  112.     {
  113.         return $this->lastSend;
  114.     }
  115.     public function setLastSend(?\DateTimeInterface $lastSend): self
  116.     {
  117.         $this->lastSend $lastSend;
  118.         return $this;
  119.     }
  120.     public function getTypeSearch(): ?string
  121.     {
  122.         return $this->typeSearch;
  123.     }
  124.     public function setTypeSearch(?string $typeSearch): self
  125.     {
  126.         $this->typeSearch $typeSearch;
  127.         return $this;
  128.     }
  129.     public function getYearRequireds(): ?array
  130.     {
  131.         return $this->year_requireds;
  132.     }
  133.     public function setYearRequireds(?array $year_requireds): self
  134.     {
  135.         $this->year_requireds $year_requireds;
  136.         return $this;
  137.     }
  138. }