import { ErrorTypeEnum } from '/@/enums/exceptionEnum';
import { MenuModeEnum, MenuTypeEnum } from '/@/enums/menuEnum';
import { RoleInfo } from '/@/api/sys/model/userModel';

// Lock screen information
export interface LockInfo {
  // Password required
  pwd?: string | undefined;
  // Is it locked?
  isLock?: boolean;
}

// Lock screen information
export interface OverviewInfo {
  // Password required
  pwd?: string | undefined;
  // Is it locked?
  id?: number;
  incrementCount?: number;
  surDownNum?: number;
  userName?: string;
  nickName?: string;
  createTime?: string;
  email?: string;
  vip?: number;
  incrementCount?: number;
  surDownNum?: number;
  cameraCount?: number;
  sceneNum?: number;
}

// Error-log information
export interface ErrorLogInfo {
  // Type of error
  type: ErrorTypeEnum;
  // Error file
  file: string;
  // Error name
  name?: string;
  // Error message
  message: string;
  // Error stack
  stack?: string;
  // Error detail
  detail: string;
  // Error url
  url: string;
  // Error time
  time?: string;
}

export interface UserInfo {
  userId: string | number;
  username: string;
  realName: string;
  avatar: string;
  head: string;
  desc?: string;
  homePath?: string;
  roleId: number;
  roles: number[] | string[]; //RoleInfo[];
  availableSpace: number;
  cameraCount: number;
  city: string | null;
  country: string;
  downloadNum: 57;
  downloadNumTotal: number;
  email: string;
  expansionTotal: number;
  head: string;
  id: number;
  incrementBindNum: string | number | null;
  incrementNum: string | number | null;
  isNotice: number;
  mainPage: string | number | null;
  nickName: string;
  organizationName: string | number | null;
  password: string;
  province: string | number | null;
  registerTime: string;
  replyCount: number;
  sceneCount: number;
  shipAddress: string | number | null;
  shipAreaPath: string | number | null;
  status: number;
  themeCount: number;
  totalSpace: string | number | null;
  usedSpace: string | number | null;
  userName: string;
  agent?: UserAgent;
}
export interface UserAgent {
  createTime: string;
  downSubNum: number;
  downTotalNum: number;
  downUseNum: number;
  highSubNum: number;
  highTotalNum: number;
  highUseNum: number;
  id: number;
  majorSubNum: number;
  majorTotalNum: number;
  majorUseNum: number;
  name: string;
  nickName: string;
  recStatus: string;
  sysUserId: number;
  updateTime: string;
  userName: string;
  parentId: string | number | null;
}
export interface BeforeMiniState {
  menuCollapsed?: boolean;
  menuSplit?: boolean;
  menuMode?: MenuModeEnum;
  menuType?: MenuTypeEnum;
}
