Guest User

Untitled

a guest
May 7th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.11 KB | None | 0 0
  1. <?php
  2.  
  3. namespace AppBundle\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6.  
  7. /**
  8.  * User
  9.  *
  10.  * @ORM\Table(name="user")
  11.  * @ORM\Entity(repositoryClass="AppBundle\Repository\UserRepository")
  12.  */
  13. class User
  14. {
  15.     /**
  16.      * @ORM\OneToOne(targetEntity="Client")
  17.      * @ORM\JoinColumn(name="id", referencedColumnName="id")
  18.      */
  19.     private $client;
  20.  
  21.     /**
  22.      * @var int
  23.      *
  24.      * @ORM\Column(name="id", type="integer")
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue(strategy="AUTO")
  27.      */
  28.     private $id;
  29.  
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="firstname", type="string", length=100)
  34.      */
  35.     private $firstname;
  36.  
  37.     /**
  38.      * @var string
  39.      *
  40.      * @ORM\Column(name="lastname", type="string", length=255)
  41.      */
  42.     private $lastname;
  43.  
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(name="username", type="string", length=30, unique=true)
  48.      */
  49.     private $username;
  50.  
  51.     /**
  52.      * @var string
  53.      *
  54.      * @ORM\Column(name="password", type="string", length=255)
  55.      */
  56.     private $password;
  57.  
  58.     /**
  59.      * @var string
  60.      *
  61.      * @ORM\Column(name="address", type="string", length=255)
  62.      */
  63.     private $address;
  64.  
  65.  
  66.     /**
  67.      * Get id
  68.      *
  69.      * @return int
  70.      */
  71.     public function getId()
  72.     {
  73.         return $this->id;
  74.     }
  75.  
  76.     /**
  77.      * Set firstname
  78.      *
  79.      * @param string $firstname
  80.      *
  81.      * @return User
  82.      */
  83.     public function setFirstname($firstname)
  84.     {
  85.         $this->firstname = $firstname;
  86.  
  87.         return $this;
  88.     }
  89.  
  90.     /**
  91.      * Get firstname
  92.      *
  93.      * @return string
  94.      */
  95.     public function getFirstname()
  96.     {
  97.         return $this->firstname;
  98.     }
  99.  
  100.     /**
  101.      * Set lastname
  102.      *
  103.      * @param string $lastname
  104.      *
  105.      * @return User
  106.      */
  107.     public function setLastname($lastname)
  108.     {
  109.         $this->lastname = $lastname;
  110.  
  111.         return $this;
  112.     }
  113.  
  114.     /**
  115.      * Get lastname
  116.      *
  117.      * @return string
  118.      */
  119.     public function getLastname()
  120.     {
  121.         return $this->lastname;
  122.     }
  123.  
  124.     /**
  125.      * Set username
  126.      *
  127.      * @param string $username
  128.      *
  129.      * @return User
  130.      */
  131.     public function setUsername($username)
  132.     {
  133.         $this->username = $username;
  134.  
  135.         return $this;
  136.     }
  137.  
  138.     /**
  139.      * Get username
  140.      *
  141.      * @return string
  142.      */
  143.     public function getUsername()
  144.     {
  145.         return $this->username;
  146.     }
  147.  
  148.     /**
  149.      * Set password
  150.      *
  151.      * @param string $password
  152.      *
  153.      * @return User
  154.      */
  155.     public function setPassword($password)
  156.     {
  157.         $this->password = $password;
  158.  
  159.         return $this;
  160.     }
  161.  
  162.     /**
  163.      * Get password
  164.      *
  165.      * @return string
  166.      */
  167.     public function getPassword()
  168.     {
  169.         return $this->password;
  170.     }
  171.  
  172.     /**
  173.      * Set address
  174.      *
  175.      * @param string $address
  176.      *
  177.      * @return User
  178.      */
  179.     public function setAddress($address)
  180.     {
  181.         $this->address = $address;
  182.  
  183.         return $this;
  184.     }
  185.  
  186.     /**
  187.      * Get address
  188.      *
  189.      * @return string
  190.      */
  191.     public function getAddress()
  192.     {
  193.         return $this->address;
  194.     }
  195.  
  196.     /**
  197.      * Set client
  198.      *
  199.      * @param \AppBundle\Entity\Client $client
  200.      *
  201.      * @return User
  202.      */
  203.     public function setClient(\AppBundle\Entity\Client $client = null)
  204.     {
  205.         $this->client = $client;
  206.  
  207.         return $this;
  208.     }
  209.  
  210.     /**
  211.      * Get client
  212.      *
  213.      * @return \AppBundle\Entity\Client
  214.      */
  215.     public function getClient()
  216.     {
  217.         return $this->client;
  218.     }
  219.  
  220.     /**
  221.      * Add client
  222.      *
  223.      * @param \AppBundle\Entity\Client $client
  224.      *
  225.      * @return User
  226.      */
  227.     public function addClient(\AppBundle\Entity\Client $client)
  228.     {
  229.         $this->client[] = $client;
  230.  
  231.         return $this;
  232.     }
  233.  
  234.     /**
  235.      * Remove client
  236.      *
  237.      * @param \AppBundle\Entity\Client $client
  238.      */
  239.     public function removeClient(\AppBundle\Entity\Client $client)
  240.     {
  241.         $this->client->removeElement($client);
  242.     }
  243. }
Add Comment
Please, Sign In to add comment