declare const __APP_ENV: ImportMetaEnv;

/**
 * 全局返回
 */
interface JsonResult<T> {
  code: number;
  message: string;
  data?: T;
}

/**
 * 选择
 */
interface SelectNodeVo<T, E = Record<string, any>> {
  value: T;
  label: string;
  options?: SelectNodeVo<T>[];
  orderIndex?: number;
  disabled?: boolean;
  extData?: E;
}

/**
 * 树
 */
interface TreeNodeVo<T, E = Record<string, any>> {
  value: T;
  parentValue: T;
  label: string;
  orderIndex?: number;
  children?: TreeNodeVo<T>[];
  extData?: E;
}

/**
 * 基本表格行
 */
interface BaseTableRowRecord {
  snowFlakeId: string;
  createUserName: string;
  createTime: string;
  updateUserName: string;
  updateTime: string;
}

interface DesensitizedVo {
  originalValue: string;
  desensitizedValue: string;
}

interface TokenInfo {
  isLogin: boolean;
  loginDevice: string;
  loginId: string;
  loginType: string;
  sessionTimeout: string;
  tag: string;
  tokenActiveTimeout: string;
  tokenName: string;
  tokenSessionTimeout: string;
  tokenTimeout: string;
  tokenValue: string;
}

interface SysUserInfo {
  /** 用户id **/
  snowFlakeId: string;
  /** 头像 **/
  avatar: string;
  /** 用户名字 **/
  name: string;
  /** 性别 **/
  sex: SelectNodeVo<"man" | "woman">;
  /** 手机号 **/
  phoneNumber: DesensitizedVo;
  /** 授权的客户端类型 **/
  authClient: SelectNodeVo<"management" | "wechat">[];
  /** 最后一次登陆时间 **/
  lastLoginTime: string;
}
