export interface UserListItem {
  user_id: number;
  user_name: string;
  user_alias: string;
  deptId: number;
}

export interface UserInfo {
  user_name: string;
  user_alias: string;
  phone_number: string;
  password: string;
  remark: string;
  role_name: string;
}

export interface PayInfo {
  id: number;
  production_id: number; //支付套餐ID
  pay_type: string; //支付方式(wxpay=微信支付 alipay=支付宝 stripe=Stripe支付)
}


export interface UserListPagination {
  total: number;
  pageSize: number;
  current: number;
}

export interface UserListData {
  list: UserListItem[];
  pagination: Partial<UserListPagination>;
}

export interface UserListParams {
  user_id?: number;
  user_name?: string;
  status?: number;
  pageSize?: number;
  current?: number;
  currentPage?: number;
  filter?: { [key: string]: any[] };
  sorter?: { [key: string]: any };

}

export interface UserListParamsV2 {
  // user_name?: string;
  // page_no?: number;
  // page_size?: number;

  user_name?: string;
  status?: number;
  pageSize?: number;
  current?: number;
  currentPage?: number;
}

export interface RoleList {
  id: number;
  create_user: string;
  created_time: string;
  remark: string;
  is_inherent: boolean;
  role: string[];
  role_alias: string;
  role_name: string;
}




export interface JobList {
  id: number;
  jobName: string;
}

export interface SelectData {
  roleList: RoleList[];
  jobList: JobList[];
}


export enum StaffState {
  Inactive = 0, //0=未激活
  Active = 1, // 1=正常
  ApproachingExpiration = 2, // 2=接近过期
  Expired = 3, //已过期

  // toString(): string {
  //   switch (this) {
  //     case StaffState.Inactive:
  //       return "未激活";
  //     case StaffState.Active:
  //       return "正常";
  //     case StaffState.ApproachingExpiration:
  //       return "接近过期";
  //     case StaffState.Expired:
  //       return "已过期";
  //     default:
  //       return "未知状态";
  //   }
  // }
}

export interface StaffQuery {
  id?: number; // 按员工ID查询
  name?: string; // 按员工名称查询
  serial_no?: string; // 按员工序列号查询
  page_no?: number; // 当前页码
  page_size?: number; // 每页显示条目数
}


export interface StaffsInfo {
  serial_no?: string;
  customer_id?: number;
  name: string;
  org_name: string;
  tone?: string;
  output_length?: string;
  description?: string | null; // 可能为 null
  trial_time?: string;
  expiring_time?: string;
  state?: StaffState; // 你需要根据 models.StaffState 的定义来确定类型
  edit_user?: string;
  is_frozen?: boolean;
  chat_url?: string;
  avatar_url?: string;
  created_time?: string;
  updated_time?: string;
}

export interface StaffsInfoWithoutId extends StaffsInfo {
  id: number;
}


export interface PaymentInfo {
  pay_type: string;
  pay_url: string;
  trade_no: string;
}

export interface PaymentOrder {
  state: number;  //订单状态(0=待支付 1=处理中 2=已成功支付 3=已取消 4=已退款 5=支付平台异常)
  message: string;  //订单交易状态信息
}


// export interface StaffsInfo {
//   id?: number;
//   serial_no?: string;
//   customer_id?: number;
//   name: string;
//   org_name: string;
//   tone?: string;
//   output_length?: string;
//   description?: string | null; // 可能为 null
//   trial_time?: string;
//   expiring_time?: string;
//   state?: StaffState; // 你需要根据 models.StaffState 的定义来确定类型
//   edit_user?: string;
//   is_frozen?: boolean;
//   chat_url?: string;
//   avatar_url?: string;
//   created_time?: string;
//   updated_time?: string;

// }