app/models/Data/User.php: add type field.
This commit is contained in:
parent
ad2258607a
commit
388b5933cb
1 changed files with 23 additions and 0 deletions
|
|
@ -9,6 +9,9 @@ use Phalcon\Validation,
|
|||
|
||||
class User extends Base
|
||||
{
|
||||
const TYPE_USER = 'user';
|
||||
const TYPE_ADMIN = 'admin';
|
||||
|
||||
const STATUS_ACTIVE = 'Active';
|
||||
const STATUS_DELETED = 'Deleted';
|
||||
const STATUS_SUSPENDED = 'Suspended';
|
||||
|
|
@ -23,6 +26,8 @@ class User extends Base
|
|||
|
||||
protected $email;
|
||||
|
||||
protected $type;
|
||||
|
||||
protected $status;
|
||||
|
||||
protected $password;
|
||||
|
|
@ -203,6 +208,24 @@ class User extends Base
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @return User
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->type = $type;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
|||
Reference in a new issue