src/Entity/SearchHistory.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SearchHistoryRepository;
  4. use DateTimeImmutable;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=SearchHistoryRepository::class)
  8.  */
  9. class SearchHistory
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private $keyword;
  21.     /**
  22.      * @ORM\Column(type="string", length=255)
  23.      */
  24.     private $keywordCorrected;
  25.     /**
  26.      * @ORM\Column(type="integer")
  27.      */
  28.     private $resultNumber;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="searchHistories")
  31.      */
  32.     private $clickAfter;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="searchHistories")
  35.      */
  36.     private $user;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity=IctusMobileAppareil::class, inversedBy="searchHistories")
  39.      */
  40.     private $appareil;
  41.     /**
  42.      * @ORM\Column(type="datetime_immutable")
  43.      */
  44.     private $createdAt;
  45.     public function __construct()
  46.     {
  47.         $this->createdAt = new DateTimeImmutable();
  48.     }
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getKeyword(): ?string
  54.     {
  55.         return $this->keyword;
  56.     }
  57.     public function setKeyword(string $keyword): self
  58.     {
  59.         $this->keyword $keyword;
  60.         return $this;
  61.     }
  62.     public function getKeywordCorrected(): ?string
  63.     {
  64.         return $this->keywordCorrected;
  65.     }
  66.     public function setKeywordCorrected(string $keywordCorrected): self
  67.     {
  68.         $this->keywordCorrected $keywordCorrected;
  69.         return $this;
  70.     }
  71.     public function getResultNumber(): ?int
  72.     {
  73.         return $this->resultNumber;
  74.     }
  75.     public function setResultNumber(int $resultNumber): self
  76.     {
  77.         $this->resultNumber $resultNumber;
  78.         return $this;
  79.     }
  80.     public function getClickAfter(): ?Product
  81.     {
  82.         return $this->clickAfter;
  83.     }
  84.     public function setClickAfter(?Product $clickAfter): self
  85.     {
  86.         $this->clickAfter $clickAfter;
  87.         return $this;
  88.     }
  89.     public function getUser(): ?User
  90.     {
  91.         return $this->user;
  92.     }
  93.     public function setUser(?User $user): self
  94.     {
  95.         $this->user $user;
  96.         return $this;
  97.     }
  98.     public function getAppareil(): ?IctusMobileAppareil
  99.     {
  100.         return $this->appareil;
  101.     }
  102.     public function setAppareil(?IctusMobileAppareil $appareil): self
  103.     {
  104.         $this->appareil $appareil;
  105.         return $this;
  106.     }
  107.     public function getCreatedAt(): ?\DateTimeImmutable
  108.     {
  109.         return $this->createdAt;
  110.     }
  111.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  112.     {
  113.         $this->createdAt $createdAt;
  114.         return $this;
  115.     }
  116. }