Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace AppBundle\Entity;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * User
- *
- * @ORM\Table(name="user")
- * @ORM\Entity(repositoryClass="AppBundle\Repository\UserRepository")
- */
- class User
- {
- /**
- * @ORM\OneToMany(targetEntity="Client", mappedBy="user")
- */
- private $client;
- public function __construct()
- {
- $this->client = new ArrayCollection();
- }
- /**
- * @var int
- *
- * @ORM\Column(name="id", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- private $id;
- /**
- * @var string
- *
- * @ORM\Column(name="firstname", type="string", length=100)
- */
- private $firstname;
- /**
- * @var string
- *
- * @ORM\Column(name="lastname", type="string", length=255)
- */
- private $lastname;
- /**
- * @var string
- *
- * @ORM\Column(name="username", type="string", length=30, unique=true)
- */
- private $username;
- /**
- * @var string
- *
- * @ORM\Column(name="password", type="string", length=255)
- */
- private $password;
- /**
- * @var string
- *
- * @ORM\Column(name="address", type="string", length=255)
- */
- private $address;
- /**
- * Get id
- *
- * @return int
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set firstname
- *
- * @param string $firstname
- *
- * @return User
- */
- public function setFirstname($firstname)
- {
- $this->firstname = $firstname;
- return $this;
- }
- /**
- * Get firstname
- *
- * @return string
- */
- public function getFirstname()
- {
- return $this->firstname;
- }
- /**
- * Set lastname
- *
- * @param string $lastname
- *
- * @return User
- */
- public function setLastname($lastname)
- {
- $this->lastname = $lastname;
- return $this;
- }
- /**
- * Get lastname
- *
- * @return string
- */
- public function getLastname()
- {
- return $this->lastname;
- }
- /**
- * Set username
- *
- * @param string $username
- *
- * @return User
- */
- public function setUsername($username)
- {
- $this->username = $username;
- return $this;
- }
- /**
- * Get username
- *
- * @return string
- */
- public function getUsername()
- {
- return $this->username;
- }
- /**
- * Set password
- *
- * @param string $password
- *
- * @return User
- */
- public function setPassword($password)
- {
- $this->password = $password;
- return $this;
- }
- /**
- * Get password
- *
- * @return string
- */
- public function getPassword()
- {
- return $this->password;
- }
- /**
- * Set address
- *
- * @param string $address
- *
- * @return User
- */
- public function setAddress($address)
- {
- $this->address = $address;
- return $this;
- }
- /**
- * Get address
- *
- * @return string
- */
- public function getAddress()
- {
- return $this->address;
- }
- /**
- * Set client
- *
- * @param \AppBundle\Entity\Client $client
- *
- * @return User
- */
- public function setClient(\AppBundle\Entity\Client $client = null)
- {
- $this->client = $client;
- return $this;
- }
- /**
- * Get client
- *
- * @return \AppBundle\Entity\Client
- */
- public function getClient()
- {
- return $this->client;
- }
- /**
- * Add client
- *
- * @param \AppBundle\Entity\Client $client
- *
- * @return User
- */
- public function addClient(\AppBundle\Entity\Client $client)
- {
- $this->client[] = $client;
- return $this;
- }
- /**
- * Remove client
- *
- * @param \AppBundle\Entity\Client $client
- */
- public function removeClient(\AppBundle\Entity\Client $client)
- {
- $this->client->removeElement($client);
- }
- }
Add Comment
Please, Sign In to add comment