<?php
namespace App\Entity\Slave;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="eposm_s_client_phone")
* @ORM\Entity(repositoryClass="App\Repository\Slave\ClientPhoneRepository")
*/
class ClientPhone
{
public function __toString()
{
return $this->getName().': '.$this->getNumber();
}
/**
* @ORM\Column(name="id", type="bigint")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(name="number", type="string", length=191)
*/
protected $number;
/**
* @ORM\Column(name="name", type="string", length=191)
*/
protected $name;
// ManyToOne
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Slave\Client", inversedBy="phones")
* @ORM\JoinColumn(name="client_id", referencedColumnName="id")
*/
private $client;
//
public function getId(): ?string
{
return $this->id;
}
public function getNumber(): ?string
{
return $this->number;
}
public function setNumber(string $number): self
{
$this->number = $number;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getClient(): ?Client
{
return $this->client;
}
public function setClient(?Client $client): self
{
$this->client = $client;
return $this;
}
}