Guest User

Untitled

a guest
Jul 2nd, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.78 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6.  
  7. /**
  8.  * Entity\User
  9.  *
  10.  * @ORM\Table(name="user", uniqueConstraints={@ORM\UniqueConstraint(name="user_idx", columns={"username", "email"})})
  11.  * @ORM\Entity
  12.  */
  13. class User
  14. {
  15.     /**
  16.      * @var integer $id
  17.      *
  18.      * @ORM\Column(name="id", type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="IDENTITY")
  21.      */
  22.     private $id;
  23.  
  24.     /**
  25.      * @var string $username
  26.      *
  27.      * @ORM\Column(name="username", type="string", length=20, nullable=true)
  28.      */
  29.     private $username;
  30.  
  31.     /**
  32.      * @var string $first_name
  33.      *
  34.      * @ORM\Column(name="first_name", type="string", length=255, nullable=true)
  35.      */
  36.     private $first_name;
  37.  
  38.     /**
  39.      * @var string $last_name
  40.      *
  41.      * @ORM\Column(name="last_name", type="string", length=255, nullable=true)
  42.      */
  43.     private $last_name;
  44.  
  45.     /**
  46.      * @var string $gender
  47.      *
  48.      * @ORM\Column(name="gender", type="string", length=1, nullable=true)
  49.      */
  50.     private $gender;
  51.  
  52.     /**
  53.      * @var date $dob
  54.      *
  55.      * @ORM\Column(name="dob", type="date", nullable=true)
  56.      */
  57.     private $dob;
  58.  
  59.     /**
  60.      * @var string $password
  61.      *
  62.      * @ORM\Column(name="password", type="string", length=255, nullable=true)
  63.      */
  64.     private $password;
  65.  
  66.     /**
  67.      * @var string $password_salt
  68.      *
  69.      * @ORM\Column(name="password_salt", type="string", length=255, nullable=true)
  70.      */
  71.     private $password_salt;
  72.  
  73.     /**
  74.      * @var string $email
  75.      *
  76.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  77.      */
  78.     private $email;
  79.  
  80.     /**
  81.      * @var text $avatar
  82.      *
  83.      * @ORM\Column(name="avatar", type="text", nullable=true)
  84.      */
  85.     private $avatar;
  86.  
  87.     /**
  88.      * @var string $role
  89.      *
  90.      * @ORM\Column(name="role", type="string", length=50)
  91.      */
  92.     private $role;
  93.  
  94.     /**
  95.      * @var datetime $datetime_created
  96.      *
  97.      * @ORM\Column(name="datetime_created", type="datetime")
  98.      */
  99.     private $datetime_created;
  100.  
  101.     /**
  102.      * @var \Doctrine\Common\Collections\ArrayCollection
  103.      *
  104.      * @ORM\OneToMany(targetEntity="Entity\UserSocialConnection", mappedBy="user", cascade={"persist","remove"})
  105.      */
  106.     private $socialConnections;
  107.  
  108.     /**
  109.      * @var \Doctrine\Common\Collections\ArrayCollection
  110.      *
  111.      * @ORM\OneToMany(targetEntity="Entity\UserActivity", mappedBy="user", cascade={"persist","remove"})
  112.      */
  113.     private $activities;
  114.  
  115.     public function __construct()
  116.     {
  117.         $this->socialConnections = new \Doctrine\Common\Collections\ArrayCollection();
  118.         $this->activities = new \Doctrine\Common\Collections\ArrayCollection();
  119.     }
  120.    
  121.     /**
  122.      * Get id
  123.      *
  124.      * @return integer
  125.      */
  126.     public function getId()
  127.     {
  128.         return $this->id;
  129.     }
  130.  
  131.     /**
  132.      * Set username
  133.      *
  134.      * @param string $username
  135.      * @return User
  136.      */
  137.     public function setUsername($username)
  138.     {
  139.         $this->username = $username;
  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 first_name
  155.      *
  156.      * @param string $firstName
  157.      * @return User
  158.      */
  159.     public function setFirstName($firstName)
  160.     {
  161.         $this->first_name = $firstName;
  162.         return $this;
  163.     }
  164.  
  165.     /**
  166.      * Get first_name
  167.      *
  168.      * @return string
  169.      */
  170.     public function getFirstName()
  171.     {
  172.         return $this->first_name;
  173.     }
  174.  
  175.     /**
  176.      * Set last_name
  177.      *
  178.      * @param string $lastName
  179.      * @return User
  180.      */
  181.     public function setLastName($lastName)
  182.     {
  183.         $this->last_name = $lastName;
  184.         return $this;
  185.     }
  186.  
  187.     /**
  188.      * Get last_name
  189.      *
  190.      * @return string
  191.      */
  192.     public function getLastName()
  193.     {
  194.         return $this->last_name;
  195.     }
  196.  
  197.     /**
  198.      * Set gender
  199.      *
  200.      * @param string $gender
  201.      * @return User
  202.      */
  203.     public function setGender($gender)
  204.     {
  205.         $this->gender = $gender;
  206.         return $this;
  207.     }
  208.  
  209.     /**
  210.      * Get gender
  211.      *
  212.      * @return string
  213.      */
  214.     public function getGender()
  215.     {
  216.         return $this->gender;
  217.     }
  218.  
  219.     /**
  220.      * Set dob
  221.      *
  222.      * @param date $dob
  223.      * @return User
  224.      */
  225.     public function setDob($dob)
  226.     {
  227.         $this->dob = $dob;
  228.         return $this;
  229.     }
  230.  
  231.     /**
  232.      * Get dob
  233.      *
  234.      * @return date
  235.      */
  236.     public function getDob()
  237.     {
  238.         return $this->dob;
  239.     }
  240.  
  241.     /**
  242.      * Set password
  243.      *
  244.      * @param string $password
  245.      * @return User
  246.      */
  247.     public function setPassword($password)
  248.     {
  249.         $this->password = $password;
  250.         return $this;
  251.     }
  252.  
  253.     /**
  254.      * Get password
  255.      *
  256.      * @return string
  257.      */
  258.     public function getPassword()
  259.     {
  260.         return $this->password;
  261.     }
  262.  
  263.     /**
  264.      * Set password_salt
  265.      *
  266.      * @param string $passwordSalt
  267.      * @return User
  268.      */
  269.     public function setPasswordSalt($passwordSalt)
  270.     {
  271.         $this->password_salt = $passwordSalt;
  272.         return $this;
  273.     }
  274.  
  275.     /**
  276.      * Get password_salt
  277.      *
  278.      * @return string
  279.      */
  280.     public function getPasswordSalt()
  281.     {
  282.         return $this->password_salt;
  283.     }
  284.  
  285.     /**
  286.      * Set email
  287.      *
  288.      * @param string $email
  289.      * @return User
  290.      */
  291.     public function setEmail($email)
  292.     {
  293.         $this->email = $email;
  294.         return $this;
  295.     }
  296.  
  297.     /**
  298.      * Get email
  299.      *
  300.      * @return string
  301.      */
  302.     public function getEmail()
  303.     {
  304.         return $this->email;
  305.     }
  306.  
  307.     /**
  308.      * Set avatar
  309.      *
  310.      * @param text $avatar
  311.      * @return User
  312.      */
  313.     public function setAvatar($avatar)
  314.     {
  315.         $this->avatar = $avatar;
  316.         return $this;
  317.     }
  318.  
  319.     /**
  320.      * Get avatar
  321.      *
  322.      * @return text
  323.      */
  324.     public function getAvatar()
  325.     {
  326.         return $this->avatar;
  327.     }
  328.  
  329.     /**
  330.      * Set role
  331.      *
  332.      * @param string $role
  333.      * @return User
  334.      */
  335.     public function setRole($role)
  336.     {
  337.         $this->role = $role;
  338.         return $this;
  339.     }
  340.  
  341.     /**
  342.      * Get role
  343.      *
  344.      * @return string
  345.      */
  346.     public function getRole()
  347.     {
  348.         return $this->role;
  349.     }
  350.  
  351.     /**
  352.      * Set datetime_created
  353.      *
  354.      * @param datetime $datetimeCreated
  355.      * @return User
  356.      */
  357.     public function setDatetimeCreated($datetimeCreated)
  358.     {
  359.         $this->datetime_created = $datetimeCreated;
  360.         return $this;
  361.     }
  362.  
  363.     /**
  364.      * Get datetime_created
  365.      *
  366.      * @return datetime
  367.      */
  368.     public function getDatetimeCreated()
  369.     {
  370.         return $this->datetime_created;
  371.     }
  372.  
  373.     /**
  374.      * Add socialConnections
  375.      *
  376.      * @param Entity\UserSocialConnection $socialConnections
  377.      */
  378.     public function addUserSocialConnection(\Entity\UserSocialConnection $socialConnections)
  379.     {
  380.         $this->socialConnections[] = $socialConnections;
  381.     }
  382.  
  383.     /**
  384.      * Get socialConnections
  385.      *
  386.      * @return Doctrine\Common\Collections\Collection
  387.      */
  388.     public function getSocialConnections()
  389.     {
  390.         return $this->socialConnections;
  391.     }
  392.  
  393.     /**
  394.      * Add activities
  395.      *
  396.      * @param Entity\UserActivity $activities
  397.      */
  398.     public function addUserActivity(\Entity\UserActivity $activities)
  399.     {
  400.         $this->activities[] = $activities;
  401.     }
  402.  
  403.     /**
  404.      * Get activities
  405.      *
  406.      * @return Doctrine\Common\Collections\Collection
  407.      */
  408.     public function getActivities()
  409.     {
  410.         return $this->activities;
  411.     }
  412. }
Add Comment
Please, Sign In to add comment