Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Entity;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * Entity\User
- *
- * @ORM\Table(name="user", uniqueConstraints={@ORM\UniqueConstraint(name="user_idx", columns={"username", "email"})})
- * @ORM\Entity
- */
- class User
- {
- /**
- * @var integer $id
- *
- * @ORM\Column(name="id", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="IDENTITY")
- */
- private $id;
- /**
- * @var string $username
- *
- * @ORM\Column(name="username", type="string", length=20, nullable=true)
- */
- private $username;
- /**
- * @var string $first_name
- *
- * @ORM\Column(name="first_name", type="string", length=255, nullable=true)
- */
- private $first_name;
- /**
- * @var string $last_name
- *
- * @ORM\Column(name="last_name", type="string", length=255, nullable=true)
- */
- private $last_name;
- /**
- * @var string $gender
- *
- * @ORM\Column(name="gender", type="string", length=1, nullable=true)
- */
- private $gender;
- /**
- * @var date $dob
- *
- * @ORM\Column(name="dob", type="date", nullable=true)
- */
- private $dob;
- /**
- * @var string $password
- *
- * @ORM\Column(name="password", type="string", length=255, nullable=true)
- */
- private $password;
- /**
- * @var string $password_salt
- *
- * @ORM\Column(name="password_salt", type="string", length=255, nullable=true)
- */
- private $password_salt;
- /**
- * @var string $email
- *
- * @ORM\Column(name="email", type="string", length=255, nullable=true)
- */
- private $email;
- /**
- * @var text $avatar
- *
- * @ORM\Column(name="avatar", type="text", nullable=true)
- */
- private $avatar;
- /**
- * @var string $role
- *
- * @ORM\Column(name="role", type="string", length=50)
- */
- private $role;
- /**
- * @var datetime $datetime_created
- *
- * @ORM\Column(name="datetime_created", type="datetime")
- */
- private $datetime_created;
- /**
- * @var \Doctrine\Common\Collections\ArrayCollection
- *
- * @ORM\OneToMany(targetEntity="Entity\UserSocialConnection", mappedBy="user", cascade={"persist","remove"})
- */
- private $socialConnections;
- /**
- * @var \Doctrine\Common\Collections\ArrayCollection
- *
- * @ORM\OneToMany(targetEntity="Entity\UserActivity", mappedBy="user", cascade={"persist","remove"})
- */
- private $activities;
- public function __construct()
- {
- $this->socialConnections = new \Doctrine\Common\Collections\ArrayCollection();
- $this->activities = new \Doctrine\Common\Collections\ArrayCollection();
- }
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * 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 first_name
- *
- * @param string $firstName
- * @return User
- */
- public function setFirstName($firstName)
- {
- $this->first_name = $firstName;
- return $this;
- }
- /**
- * Get first_name
- *
- * @return string
- */
- public function getFirstName()
- {
- return $this->first_name;
- }
- /**
- * Set last_name
- *
- * @param string $lastName
- * @return User
- */
- public function setLastName($lastName)
- {
- $this->last_name = $lastName;
- return $this;
- }
- /**
- * Get last_name
- *
- * @return string
- */
- public function getLastName()
- {
- return $this->last_name;
- }
- /**
- * Set gender
- *
- * @param string $gender
- * @return User
- */
- public function setGender($gender)
- {
- $this->gender = $gender;
- return $this;
- }
- /**
- * Get gender
- *
- * @return string
- */
- public function getGender()
- {
- return $this->gender;
- }
- /**
- * Set dob
- *
- * @param date $dob
- * @return User
- */
- public function setDob($dob)
- {
- $this->dob = $dob;
- return $this;
- }
- /**
- * Get dob
- *
- * @return date
- */
- public function getDob()
- {
- return $this->dob;
- }
- /**
- * 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 password_salt
- *
- * @param string $passwordSalt
- * @return User
- */
- public function setPasswordSalt($passwordSalt)
- {
- $this->password_salt = $passwordSalt;
- return $this;
- }
- /**
- * Get password_salt
- *
- * @return string
- */
- public function getPasswordSalt()
- {
- return $this->password_salt;
- }
- /**
- * Set email
- *
- * @param string $email
- * @return User
- */
- public function setEmail($email)
- {
- $this->email = $email;
- return $this;
- }
- /**
- * Get email
- *
- * @return string
- */
- public function getEmail()
- {
- return $this->email;
- }
- /**
- * Set avatar
- *
- * @param text $avatar
- * @return User
- */
- public function setAvatar($avatar)
- {
- $this->avatar = $avatar;
- return $this;
- }
- /**
- * Get avatar
- *
- * @return text
- */
- public function getAvatar()
- {
- return $this->avatar;
- }
- /**
- * Set role
- *
- * @param string $role
- * @return User
- */
- public function setRole($role)
- {
- $this->role = $role;
- return $this;
- }
- /**
- * Get role
- *
- * @return string
- */
- public function getRole()
- {
- return $this->role;
- }
- /**
- * Set datetime_created
- *
- * @param datetime $datetimeCreated
- * @return User
- */
- public function setDatetimeCreated($datetimeCreated)
- {
- $this->datetime_created = $datetimeCreated;
- return $this;
- }
- /**
- * Get datetime_created
- *
- * @return datetime
- */
- public function getDatetimeCreated()
- {
- return $this->datetime_created;
- }
- /**
- * Add socialConnections
- *
- * @param Entity\UserSocialConnection $socialConnections
- */
- public function addUserSocialConnection(\Entity\UserSocialConnection $socialConnections)
- {
- $this->socialConnections[] = $socialConnections;
- }
- /**
- * Get socialConnections
- *
- * @return Doctrine\Common\Collections\Collection
- */
- public function getSocialConnections()
- {
- return $this->socialConnections;
- }
- /**
- * Add activities
- *
- * @param Entity\UserActivity $activities
- */
- public function addUserActivity(\Entity\UserActivity $activities)
- {
- $this->activities[] = $activities;
- }
- /**
- * Get activities
- *
- * @return Doctrine\Common\Collections\Collection
- */
- public function getActivities()
- {
- return $this->activities;
- }
- }
Add Comment
Please, Sign In to add comment