import { Serializable } from '../Serializable'; export class Principal implements Serializable { id: number; token: string; name: string; expiresAt: Date; appRoles: Principal.AppRole[]; fromJSONObject(item: any): Principal { this.id = item.id; this.token = item.token; this.name = item.name; this.expiresAt = item.expiresAt; this.appRoles = item.appRoles; return this; } } export namespace Principal { export enum AppRole { Admin = 0, User = 1 } }