export class UserModel
{
  id: number;
  expires?: Date;
  loginId: string;
  userName: string;
  systemDate: Date;
  loginTime: string;
  logoutTime?: Date;
  validUser: boolean;
  loginStatus: number;
  authMethod: number;
  notificationCount: number;
  pwdChangeRequired: boolean;
  authenticationToken?: string;
  authRequiredAtLogin: boolean;

  //Returned by the login endpoint since the token based authentication
  refreshToken?: string;
  userPlatFormType?: number;
  userRoleType?: string;
  employeeNumber?: string;

  //Permission keys of the logged in user, "<moduleId>" = select, "_1" = add, "_2" = edit, "_3" = delete
  moduleIds: string[] = [];
  returnStatus: number;
  returnMessage: any[] = [];
  validationErrors: any[] = [];

  //Not returned by the login endpoint anymore, defaults are applied on the client
  logId?: number;
  idleTime?: number;
  pingTime?: number;
  employeeId?: number;
  timeoutTime?: number;
  dbOnStartup?: boolean;
  schemeName: string = 'dark';
  themeName: string = 'yellow';
  menuLayout: string = 'overlay';
}

export class NotificationEmitter
{
  raised: boolean;
}

export class LoginEmitter
{
  userId: number;
  loggedIn: boolean;
}

export class TaskStatusEmitter
{
  userId: number;
  taskStatus: number;
  teamSpaceId: number;
}
