// store.ts-------------------------------------------------
interface sysMenu {
  name: string;
  icon: string;
  path: string;
  menu_id: string;
  route_only: boolean;
  detail?: sysMenu[];
}

interface userinfo {
  avatar?: string;
  email?: string;
  location?: string;
  mobile?: string;
  nickname?: string;
  type?: string;
  username?: string;
}

// sys-menu-------------------------------------------------
interface sysMenuList {
  id?: number;
  menu_id: string;
  name: string;
  path: string;
  icon: string;
  route_only: boolean;
  user_type: string;
  white_list: string;
  children?: sysMenuList[];
}
interface sysSettings {
  name: string;
  cn_name: string;
  value: string;
  d_type: "string" | "option";
}
interface typeUserList {
  username: string;
  nickname: string;
  avatar: string;
  mobile: string;
  email: string;
  type: string;
}

interface accountBillData {
  date: string;
  balance: number;
  changes: number;
  duration: string;
  detail: accountBillDetailData[];
}
interface accountBillDetailData {
  card: string;
  balance: number;
  changes: number;
}

// files-------------------------------------------------
interface fileList {
  name: string;
  type: string;
  size?: number;
}

// sys-info-----------------------------------------------
interface resSystem {
  data: { hostname: string; ip: string }[];
}
interface resSysInfo {
  data: {
    datetime: string;
    cpu_per: number;
    disk: { point: string; total: string; used: string; per: number }[];
    mem: { mem_total: string; mem_used: string; mem_per: number };
    net: { sent: string; rec: string };
  }[];
}

// yl-chess-----------------------------------------------------
interface chess {
  ID: number;
  players: string;
  current: string;
  is_end: string;
  status: string;
  winner: string;
  chess_id: string;
}
// yl-backgammon------------------------------------------------
interface roomStatus {
  room_id: number;
  player: string;
}
