src/Entity/Slave/UserProfile.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_user_profile")
  9.  * @ORM\Entity
  10.  */
  11. class UserProfile
  12. {
  13.     public function __toString()
  14.     {
  15.         return $this->name." ".$this->surname;
  16.     }
  17.     
  18.     public function displayAddress()
  19.           {
  20.               $result '';
  21.               if($this->address != null$result.= $this->address;
  22.               if($this->civic != null$result.= ' '.$this->civic;
  23.               if($this->zip != null$result.= ', '.$this->zip;
  24.               return $result;
  25.           }
  26.     
  27.     /**
  28.      * @ORM\Column(name="id", type="bigint")
  29.      * @ORM\Id
  30.      * @ORM\GeneratedValue(strategy="AUTO")
  31.      */
  32.     protected $id;
  33.     /**
  34.      * @ORM\Column(name="name", type="string", length=191)
  35.      */
  36.     protected $name;
  37.     
  38.     /**
  39.      * @ORM\Column(name="surname", type="string", length=191)
  40.      */
  41.     protected $surname;
  42.     
  43.     /**
  44.      * @ORM\Column(name="phone", type="string", nullable=true, length=191)
  45.      */
  46.     protected $phone;
  47.     
  48.     /**
  49.      * @ORM\Column(name="fiscal_code", type="string", nullable=true, length=191)
  50.      */
  51.     protected $fiscalCode;
  52.     
  53.     /**
  54.      * @ORM\Column(name="vat", type="string", nullable=true, length=191)
  55.      */
  56.     protected $vat;
  57.     
  58.     /**
  59.      * @ORM\Column(name="phone_personal", type="string", nullable=true, length=191)
  60.      */
  61.     protected $phonePersonal;
  62.     
  63.     /**
  64.      * @ORM\Column(name="email_personal", type="string", nullable=true, length=191)
  65.      */
  66.     protected $emailPersonal;
  67.     
  68.     /**
  69.      * @ORM\Column(name="address", type="string", nullable=true, length=191)
  70.      */
  71.     protected $address;
  72.     
  73.     /**
  74.      * @ORM\Column(name="civic", type="string", nullable=true, length=191)
  75.      */
  76.     protected $civic;
  77.     
  78.     /**
  79.      * @ORM\Column(name="zip", type="string", nullable=true, length=191)
  80.      */
  81.     protected $zip;
  82.     
  83.     /**
  84.      * @ORM\Column(name="id_city", type="bigint", nullable=true)
  85.      */
  86.     protected $idCity;
  87.     // OneToOne
  88.         /**
  89.          * @ORM\OneToOne(targetEntity="App\Entity\Slave\User", inversedBy="profile")
  90.          * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  91.          */
  92.         private $user;
  93.     //
  94.     public function getId(): ?string
  95.     {
  96.         return $this->id;
  97.     }
  98.     public function getName(): ?string
  99.     {
  100.         return $this->name;
  101.     }
  102.     public function setName(string $name): self
  103.     {
  104.         $this->name $name;
  105.         return $this;
  106.     }
  107.     public function getSurname(): ?string
  108.     {
  109.         return $this->surname;
  110.     }
  111.     public function setSurname(string $surname): self
  112.     {
  113.         $this->surname $surname;
  114.         return $this;
  115.     }
  116.     public function getPhone(): ?string
  117.     {
  118.         return $this->phone;
  119.     }
  120.     public function setPhone(?string $phone): self
  121.     {
  122.         $this->phone $phone;
  123.         return $this;
  124.     }
  125.     public function getFiscalCode(): ?string
  126.     {
  127.         return $this->fiscalCode;
  128.     }
  129.     public function setFiscalCode(?string $fiscalCode): self
  130.     {
  131.         $this->fiscalCode $fiscalCode;
  132.         return $this;
  133.     }
  134.     public function getVat(): ?string
  135.     {
  136.         return $this->vat;
  137.     }
  138.     public function setVat(?string $vat): self
  139.     {
  140.         $this->vat $vat;
  141.         return $this;
  142.     }
  143.     public function getPhonePersonal(): ?string
  144.     {
  145.         return $this->phonePersonal;
  146.     }
  147.     public function setPhonePersonal(?string $phonePersonal): self
  148.     {
  149.         $this->phonePersonal $phonePersonal;
  150.         return $this;
  151.     }
  152.     public function getEmailPersonal(): ?string
  153.     {
  154.         return $this->emailPersonal;
  155.     }
  156.     public function setEmailPersonal(?string $emailPersonal): self
  157.     {
  158.         $this->emailPersonal $emailPersonal;
  159.         return $this;
  160.     }
  161.     public function getAddress(): ?string
  162.     {
  163.         return $this->address;
  164.     }
  165.     public function setAddress(?string $address): self
  166.     {
  167.         $this->address $address;
  168.         return $this;
  169.     }
  170.     public function getCivic(): ?string
  171.     {
  172.         return $this->civic;
  173.     }
  174.     public function setCivic(?string $civic): self
  175.     {
  176.         $this->civic $civic;
  177.         return $this;
  178.     }
  179.     public function getZip(): ?string
  180.     {
  181.         return $this->zip;
  182.     }
  183.     public function setZip(?string $zip): self
  184.     {
  185.         $this->zip $zip;
  186.         return $this;
  187.     }
  188.     public function getIdCity(): ?string
  189.     {
  190.         return $this->idCity;
  191.     }
  192.     public function setIdCity(?string $idCity): self
  193.     {
  194.         $this->idCity $idCity;
  195.         return $this;
  196.     }
  197.     public function getUser(): ?User
  198.     {
  199.         return $this->user;
  200.     }
  201.     public function setUser(?User $user): self
  202.     {
  203.         $this->user $user;
  204.         return $this;
  205.     }
  206. }