<?phpnamespace App\Entity;use App\Repository\IctusMobileAppareilRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=IctusMobileAppareilRepository::class) */class IctusMobileAppareil{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="text") */ private $cfm_tokem; /** * @ORM\ManyToOne(targetEntity=User::class, inversedBy="ictusMobileAppareils") * @ORM\JoinColumn(nullable=true) */ private $user; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $adresseIP; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $browser; /** * @ORM\OneToMany(targetEntity=SearchHistory::class, mappedBy="appareil") */ private $searchHistories; public function __construct() { $this->searchHistories = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getCfmTokem(): ?string { return $this->cfm_tokem; } public function setCfmTokem(string $cfm_tokem): self { $this->cfm_tokem = $cfm_tokem; return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getAdresseIP(): ?string { return $this->adresseIP; } public function setAdresseIP(?string $adresseIP): self { $this->adresseIP = $adresseIP; return $this; } public function getBrowser(): ?string { return $this->browser; } public function setBrowser(?string $browser): self { $this->browser = $browser; return $this; } /** * @return Collection<int, SearchHistory> */ public function getSearchHistories(): Collection { return $this->searchHistories; } public function addSearchHistory(SearchHistory $searchHistory): self { if (!$this->searchHistories->contains($searchHistory)) { $this->searchHistories[] = $searchHistory; $searchHistory->setAppareil($this); } return $this; } public function removeSearchHistory(SearchHistory $searchHistory): self { if ($this->searchHistories->removeElement($searchHistory)) { // set the owning side to null (unless already changed) if ($searchHistory->getAppareil() === $this) { $searchHistory->setAppareil(null); } } return $this; }}