Commit f1f7f086 authored by philippepary's avatar philippepary
Browse files

Added User model

parent 9c0e65f6
......@@ -26,9 +26,17 @@ use \Pasteque\Server\System\DAO\DoctrineModel;
/**
* Class User
* @package Pasteque
* @SWG\Definition(type="object")
* @Entity
* @Table(name="users")
* @rest\model User
* @rest\description The user of a cash register, the one who hold the point of sale
* @rest\property Int id ID of the user
* @rest\property String name Full name of the user
* @rest\property String password Password of the user
* @rest\property Int role ID of the role (ACL) for this user
* @rest\property Boolean active Wether this user is active or not
* @rest\property Boolean hasImage Wether this user has a custom image or not
* @rest\property String card Code of usercard (barcode, qrcode …)
*/
class User extends DoctrineModel
{
......@@ -46,7 +54,6 @@ class User extends DoctrineModel
/**
* @var integer
* @SWG\Property()
* @Id @Column(type="integer")
* @GeneratedValue
*/
......@@ -55,7 +62,6 @@ class User extends DoctrineModel
/**
* @var string
* @SWG\Property()
* @Column(type="string")
*/
protected $name;
......@@ -64,7 +70,6 @@ class User extends DoctrineModel
/** User password.
* @var string
* @SWG\Property()
* @Column(type="string", nullable=true)
*/
protected $password;
......@@ -76,7 +81,6 @@ class User extends DoctrineModel
/**
* ID of the assigned role
* @var integer
* @SWG\Property()
* @ManyToOne(targetEntity="Role")
* @JoinColumn(name="role_id", referencedColumnName="id", nullable=false)
*/
......@@ -86,7 +90,6 @@ class User extends DoctrineModel
/**
* @var bool
* @SWG\Property()
* @Column(type="boolean")
*/
protected $active = true;
......@@ -97,7 +100,6 @@ class User extends DoctrineModel
/**
* True if an image can be found for this model.
* @var bool
* @SWG\Property()
* @Column(type="boolean")
*/
protected $hasImage = false;
......@@ -108,7 +110,6 @@ class User extends DoctrineModel
/**
* Code of User's card
* @var string
* @SWG\Property()
* @Column(type="string", nullable=true)
*/
protected $card;
......
Supports Markdown
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