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.         public function getId(): ?string
  41.         {
  42.             return $this->id;
  43.         }
  44.         public function getNumber(): ?string
  45.         {
  46.             return $this->number;
  47.         }
  48.         public function setNumber(string $number): static
  49.         {
  50.             $this->number $number;
  51.             return $this;
  52.         }
  53.         public function getName(): ?string
  54.         {
  55.             return $this->name;
  56.         }
  57.         public function setName(string $name): static
  58.         {
  59.             $this->name $name;
  60.             return $this;
  61.         }
  62.         public function getClient(): ?Client
  63.         {
  64.             return $this->client;
  65.         }
  66.         public function setClient(?Client $client): static
  67.         {
  68.             $this->client $client;
  69.             return $this;
  70.         }
  71. }