src/Entity/Slave/ClientPhone.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Slave;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Table(name="eposm_s_client_phone")
  9.  * @ORM\Entity(repositoryClass="App\Repository\Slave\ClientPhoneRepository")
  10.  */
  11. class ClientPhone
  12. {    
  13.     public function __toString()
  14.     {
  15.         return $this->getName().': '.$this->getNumber();
  16.     }
  17.     /**
  18.      * @ORM\Column(name="id", type="bigint")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     protected $id;
  23.     
  24.     /**
  25.      * @ORM\Column(name="number", type="string", length=191)
  26.      */
  27.     protected $number;
  28.     
  29.     /**
  30.      * @ORM\Column(name="name", type="string", length=191)
  31.      */
  32.     protected $name;
  33.         
  34.     // ManyToOne
  35.         /**
  36.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\Client", inversedBy="phones")
  37.          * @ORM\JoinColumn(name="client_id", referencedColumnName="id")
  38.          */
  39.         private $client;
  40.     //
  41.     public function getId(): ?string
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getNumber(): ?string
  46.     {
  47.         return $this->number;
  48.     }
  49.     public function setNumber(string $number): self
  50.     {
  51.         $this->number $number;
  52.         return $this;
  53.     }
  54.     public function getName(): ?string
  55.     {
  56.         return $this->name;
  57.     }
  58.     public function setName(string $name): self
  59.     {
  60.         $this->name $name;
  61.         return $this;
  62.     }
  63.     public function getClient(): ?Client
  64.     {
  65.         return $this->client;
  66.     }
  67.     public function setClient(?Client $client): self
  68.     {
  69.         $this->client $client;
  70.         return $this;
  71.     }
  72. }