Commit b745ea20 authored by François Agneray's avatar François Agneray

Add property role to the entity user

parent ac895bc4
......@@ -26,6 +26,13 @@ class User implements \JsonSerializable
*/
protected $email;
/**
* @var string
*
* @Column(type="string", nullable=false)
*/
protected $role;
/**
* @var Anis\Entity\Group
*
......@@ -44,6 +51,16 @@ class User implements \JsonSerializable
return $this->email;
}
public function getRole()
{
return $this->role;
}
public function setRole($role)
{
$this->role = $role;
}
public function getGroup()
{
return $this->group;
......@@ -58,6 +75,7 @@ class User implements \JsonSerializable
{
return [
'email' => $this->getEmail(),
'role' => $this->getRole(),
'id_group' => $this->getGroup()->getId()
];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment