src/Entity/IctusMobileAppareil.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\IctusMobileAppareilRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=IctusMobileAppareilRepository::class)
  9.  */
  10. class IctusMobileAppareil
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="text")
  20.      */
  21.     private $cfm_tokem;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="ictusMobileAppareils")
  24.      * @ORM\JoinColumn(nullable=true)
  25.      */
  26.     private $user;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $adresseIP;
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true)
  33.      */
  34.     private $browser;
  35.     /**
  36.      * @ORM\OneToMany(targetEntity=SearchHistory::class, mappedBy="appareil")
  37.      */
  38.     private $searchHistories;
  39.     public function __construct()
  40.     {
  41.         $this->searchHistories = new ArrayCollection();
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getCfmTokem(): ?string
  48.     {
  49.         return $this->cfm_tokem;
  50.     }
  51.     public function setCfmTokem(string $cfm_tokem): self
  52.     {
  53.         $this->cfm_tokem $cfm_tokem;
  54.         return $this;
  55.     }
  56.     public function getUser(): ?User
  57.     {
  58.         return $this->user;
  59.     }
  60.     public function setUser(?User $user): self
  61.     {
  62.         $this->user $user;
  63.         return $this;
  64.     }
  65.     public function getAdresseIP(): ?string
  66.     {
  67.         return $this->adresseIP;
  68.     }
  69.     public function setAdresseIP(?string $adresseIP): self
  70.     {
  71.         $this->adresseIP $adresseIP;
  72.         return $this;
  73.     }
  74.     public function getBrowser(): ?string
  75.     {
  76.         return $this->browser;
  77.     }
  78.     public function setBrowser(?string $browser): self
  79.     {
  80.         $this->browser $browser;
  81.         return $this;
  82.     }
  83.     /**
  84.      * @return Collection<int, SearchHistory>
  85.      */
  86.     public function getSearchHistories(): Collection
  87.     {
  88.         return $this->searchHistories;
  89.     }
  90.     public function addSearchHistory(SearchHistory $searchHistory): self
  91.     {
  92.         if (!$this->searchHistories->contains($searchHistory)) {
  93.             $this->searchHistories[] = $searchHistory;
  94.             $searchHistory->setAppareil($this);
  95.         }
  96.         return $this;
  97.     }
  98.     public function removeSearchHistory(SearchHistory $searchHistory): self
  99.     {
  100.         if ($this->searchHistories->removeElement($searchHistory)) {
  101.             // set the owning side to null (unless already changed)
  102.             if ($searchHistory->getAppareil() === $this) {
  103.                 $searchHistory->setAppareil(null);
  104.             }
  105.         }
  106.         return $this;
  107.     }
  108. }