2018-06-06 06:00:01 +00:00
|
|
|
export default class User {
|
|
|
|
/**
|
|
|
|
* Create a new user model.
|
|
|
|
*
|
|
|
|
* @param {Boolean} admin
|
|
|
|
* @param {String} username
|
|
|
|
* @param {String} email
|
|
|
|
* @param {String} first_name
|
|
|
|
* @param {String} last_name
|
|
|
|
* @param {String} language
|
|
|
|
*/
|
|
|
|
constructor({
|
2018-07-15 05:42:58 +00:00
|
|
|
root_admin,
|
2018-06-06 06:00:01 +00:00
|
|
|
username,
|
|
|
|
email,
|
|
|
|
first_name,
|
|
|
|
last_name,
|
|
|
|
language,
|
|
|
|
}) {
|
2018-07-15 05:42:58 +00:00
|
|
|
this.admin = root_admin;
|
2018-06-06 06:00:01 +00:00
|
|
|
this.username = username;
|
|
|
|
this.email = email;
|
|
|
|
this.name = `${first_name} ${last_name}`;
|
|
|
|
this.first_name = first_name;
|
|
|
|
this.last_name = last_name;
|
|
|
|
this.language = language;
|
2018-05-28 22:37:09 +00:00
|
|
|
}
|
|
|
|
}
|