Updated to angular 11
Now compiling with strict mode in typescript Need to error checking now
This commit is contained in:
@ -1,20 +1,28 @@
|
||||
import { UserGroup } from './user-group';
|
||||
|
||||
export class User {
|
||||
id: string;
|
||||
id: string | undefined;
|
||||
name: string;
|
||||
password: string;
|
||||
lockedOut: boolean;
|
||||
roles?: UserGroup[];
|
||||
roles: UserGroup[];
|
||||
perms: string[];
|
||||
isAuthenticated: boolean;
|
||||
access_token?: string;
|
||||
exp?: number;
|
||||
exp: number;
|
||||
ver: string;
|
||||
lastDevice: string;
|
||||
lastDate?: string;
|
||||
|
||||
public constructor(init?: Partial<User>) {
|
||||
this.id = undefined;
|
||||
this.name = '';
|
||||
this.password = '';
|
||||
this.lockedOut = true;
|
||||
this.roles = [];
|
||||
this.perms = [];
|
||||
this.exp = 0;
|
||||
this.ver = '';
|
||||
this.lastDevice = '';
|
||||
Object.assign(this, init);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user