namespace lxsextel {
//! Dummy description for the service
/*! Some detailed description of the service */
// '*location' comment sets resource path for this service
// *location: users
// *table: users
struct User
{
// *pk: true
// *autoincrement: true
ngrest::Nullable<int> id;
// *unique: true
std::string username;
std::string password;
int userstate; // deleted, activated, deactivated
std::string firstname;
std::string lastname;
std::string mi;
std::string idcode;
int companyid;
std::string ssn;
std::string photoidfilename;
std::string email;
std::string phone;
int accesslevelid;
std::string description;
};
class Users: public ngrest::Service
{
public:
// *method: GET
// *location: /
std::list<User> list();
// *method: POST
// *location: /{id}
int create(const User& user);
// *method: GET
// *location: /{id}
User read(int id) const;
// *method: PUT
// *location: /{id}
void update(int id, const User& user);
// *method: DELETE
// *location: /{id}
void del(int id);
};
}