daily pastebin goal
13%
SHARE
TWEET

Untitled

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