<?phpnamespace App\Entity;use App\Repository\ClienteRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=ClienteRepository::class) */class Cliente{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $nombre; /** * @ORM\ManyToOne(targetEntity=Country::class, inversedBy="clientes") * @ORM\JoinColumn(nullable=false) */ private $country; /** * @ORM\ManyToOne(targetEntity=AcuerdoNivelServicio::class, inversedBy="clientes") * @ORM\JoinColumn(nullable=false) */ private $AcuerdoNivelServicio; /** * @ORM\OneToMany(targetEntity=Ticket::class, mappedBy="Cliente") */ private $tickets; /** * @ORM\Column(type="string", length=255, unique=true) */ private string $token; public function __construct() { $this->tickets = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getNombre(): ?string { return $this->nombre; } public function setNombre(string $nombre): self { $this->nombre = $nombre; return $this; } public function getCountry(): ?Country { return $this->country; } public function setCountry(?Country $country): self { $this->country = $country; return $this; } public function getAcuerdoNivelServicio(): ?AcuerdoNivelServicio { return $this->AcuerdoNivelServicio; } public function setAcuerdoNivelServicio(?AcuerdoNivelServicio $AcuerdoNivelServicio): self { $this->AcuerdoNivelServicio = $AcuerdoNivelServicio; return $this; } /** * @return Collection<int, Ticket> */ public function getTickets(): Collection { return $this->tickets; } public function addTicket(Ticket $ticket): self { if (!$this->tickets->contains($ticket)) { $this->tickets[] = $ticket; $ticket->setCliente($this); } return $this; } public function removeTicket(Ticket $ticket): self { if ($this->tickets->removeElement($ticket)) { // set the owning side to null (unless already changed) if ($ticket->getCliente() === $this) { $ticket->setCliente(null); } } return $this; } public function getToken(): string { return $this->token; } public function setToken(string $token): self { $this->token = $token; return $this; }}