2020-10-11 05:26:29 +00:00
|
|
|
import { UserGroup } from './user-group';
|
|
|
|
|
2019-06-13 19:02:34 +00:00
|
|
|
export class User {
|
2020-11-22 04:43:37 +00:00
|
|
|
id: string | undefined;
|
2019-06-13 19:02:34 +00:00
|
|
|
name: string;
|
|
|
|
password: string;
|
|
|
|
lockedOut: boolean;
|
2020-11-22 04:43:37 +00:00
|
|
|
roles: UserGroup[];
|
2019-06-13 19:02:34 +00:00
|
|
|
perms: string[];
|
2020-06-14 13:13:10 +00:00
|
|
|
access_token?: string;
|
2020-11-22 04:43:37 +00:00
|
|
|
exp: number;
|
2020-10-11 05:43:06 +00:00
|
|
|
ver: string;
|
2020-10-27 11:29:24 +00:00
|
|
|
lastDevice: string;
|
|
|
|
lastDate?: string;
|
2019-06-13 19:02:34 +00:00
|
|
|
|
|
|
|
public constructor(init?: Partial<User>) {
|
2020-11-22 04:43:37 +00:00
|
|
|
this.id = undefined;
|
|
|
|
this.name = '';
|
|
|
|
this.password = '';
|
|
|
|
this.lockedOut = true;
|
|
|
|
this.roles = [];
|
|
|
|
this.perms = [];
|
|
|
|
this.exp = 0;
|
|
|
|
this.ver = '';
|
|
|
|
this.lastDevice = '';
|
2019-06-13 19:02:34 +00:00
|
|
|
Object.assign(this, init);
|
|
|
|
}
|
|
|
|
}
|