Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace model;
- /**
- * @Entity
- * @Table(name="user")
- */
- class User {
- /**
- * @var integer
- * @Id
- * @Column(type="integer")
- * @GeneratedValue
- */
- protected $userId;
- /**
- * @var string
- * @Column(type="string", length=45)
- */
- protected $userName;
- /**
- * @var string
- * @Column(type="string", length=30)
- */
- protected $securityGroup;
- /**
- * @var string
- * @Column(type="string", length=45)
- */
- protected $firstName;
- /**
- * @var string
- * @Column(type="string", length=45)
- */
- protected $lastName;
- /**
- * @var string
- * @Column(type="string", length=100)
- */
- protected $password;
- /**
- * @var \DateTime
- * @Column(type="datetime")
- */
- protected $passwordExpiration;
- /**
- * @var string
- * @Column(type="string", length=100)
- */
- protected $email;
- /**
- * @var boolean
- * @Column(type="boolean")
- */
- protected $enabled;
- /**
- * @var \DateTime
- * @column(type="datetime")
- */
- protected $dateTimeCreated;
- /**
- * Organization (:assignment)
- *
- * @var Organization
- */
- protected $organization;
- public function __construct() {
- $this->dateTimeCreated = new \DateTime("now", new \DateTimeZone('UTC'));
- }
- /**
- * Retrieve User ID
- *
- * @return integer
- */
- public function getUserId() {
- return $this->userId;
- }
- /**
- * Set User Name
- *
- * @param string $userName
- * @return User
- */
- public function setUserName($userName) {
- $this->userName = $userName;
- return $this;
- }
- /**
- * Retrieve User Name
- *
- * @return string
- */
- public function getUserName() {
- return $this->userName;
- }
- /**
- * Set Password
- *
- * @param string $password
- * @return User
- */
- protected function setPassword($password) {
- $this->password = $password;
- return $this;
- }
- /**
- * Retrieve Password
- *
- * @return string
- */
- protected function getPassword() {
- return $this->password;
- }
- /**
- * Set Password Expiration Date/Time
- *
- * @param mixed $passwordExpiration
- * @return User
- */
- protected function setPasswordExpiration($passwordExpiration) {
- $this->passwordExpiration = $passwordExpiration;
- return $this;
- }
- /**
- * Retrieve Password Expiration Date/Time
- *
- * @return \DateTime
- */
- public function getPasswordExpiration() {
- return $this->passwordExpiration;
- }
- /**
- * Set First Name
- *
- * @param string $firstName
- * @return User
- */
- public function setFirstName($firstName) {
- $this->firstName = $firstName;
- return $this;
- }
- /**
- * Retrieve First Name
- *
- * @return string
- */
- public function getFirstName() {
- return $this->firstName;
- }
- /**
- * Enable/Disable User
- *
- * @return User
- */
- public function setEnabled($enabled) {
- $this->enabled = $enabled;
- return $this;
- }
- /**
- * Retrieve Enabled status
- *
- * @return integer
- */
- public function getEnabled() {
- return $this->enabled;
- }
- /**
- * Proxies to the getEnabled method returning a boolean
- *
- * @return boolean
- */
- public function isEnabled() {
- return (bool) $this->getEnabled();
- }
- /**
- * Set Last Name
- *
- * @param string $lastName
- * @return User
- */
- public function setLastName($lastName) {
- $this->lastName = $lastName;
- return $this;
- }
- /**
- * Retrieve Last Name
- *
- * @return string
- */
- public function getLastName() {
- return $this->lastName;
- }
- /**
- * Set Email
- *
- * @param string $email
- * @return User
- */
- public function setEmail($email) {
- $this->email = $email;
- return $this;
- }
- /**
- * Retrieve Email
- *
- * @return string
- */
- public function getEmail() {
- return $this->email;
- }
- /**
- * Retrieve Date/Time Created
- *
- * @return \DateTime
- */
- public function getDateTimeCreated() {
- return $this->dateTimeCreated;
- }
- /**
- * Set Associated Organization Entity
- *
- * @param ets\model\Organization $organization
- * @return User
- */
- public function setOrganization(\ets\model\Organization $organization) {
- $this->organization = $organization;
- return $this;
- }
- /**
- * Retrieve user's security group ID
- *
- * @return string
- */
- public function getSecurityGroup() {
- return $this->securityGroup;
- }
- /**
- * Set user's security group ID
- *
- * @param $group
- * @return User
- */
- public function setSecurityGroup($securityGroup) {
- $this->securityGroup = $securityGroup;
- return $this;
- }
- }
Add Comment
Please, Sign In to add comment