// 请求响应参数（不包含data）
import {asInfos, user} from "@/stores/interface";

export interface Result {
  code: string;
  msg: string;
}

// 请求响应参数（包含data）
export interface ResultData<T = any> extends Result {
  data: T;
}

// 分页响应参数
export interface ResPage<T> {
  list: T[];
  pageNum: number;
  pageSize: number;
  total: number;
}

// 分页请求参数
export interface ReqPage {
  pageNum: number;
  pageSize: number;
}

// 文件上传模块
export namespace Upload {
  export interface ResFileUrl {
    fileUrl: string;
  }
}

// 登录模块
export namespace Login {
  export interface ReqLoginForm {
    username: string;
    password: string;
    rememberMe: boolean
  }
  export interface ResLogin {
    access_token: string;
    user: user;
    asInfo:[]
  }
  export interface ResAuthButtons {
    [key: string]: string[];
  }
}


// 用户管理模块
export namespace User {
  export interface ReqUserParams extends ReqPage {
    username: string;
    gender: number;
    idCard: string;
    email: string;
    address: string;
    createTime: string[];
    status: number;
  }

  export interface ResStationsList {

  }
  export interface ResUserList {
    id: string;
    username: string;
    gender: number;
    user: { detail: { age: number } };
    idCard: string;
    email: string;
    address: string;
    createTime: string;
    status: number;
    avatar: string;
    photo: any[];
    children?: ResUserList[];
  }
  export interface ResStatus {
    userLabel: string;
    userValue: number;
  }
  export interface ResGender {
    genderLabel: string;
    genderValue: number;
  }
  export interface ResDepartment {
    id: string;
    name: string;
    children?: ResDepartment[];
  }
  export interface ResRole {
    id: string;
    name: string;
    children?: ResDepartment[];
  }

  export interface Platform {
    as_code:string;
    as_name:string;
    pagesize:string;
    currentpage:string;
  }

}

export class Platform {
}

export class ElementColumnsList {
  data_r_table?: string;
  data_id?: number;
  data_type?: string;
  data_item?: string;
  data_name?: string;
  data_unit?: string;
  data_h_table?: string;
  data_value?: string;
  data_order?: number;
  data_condition?: number;
  isSelected?:boolean
}
