import { BasicPageParams, BasicFetchResult } from '@/api/model/baseModel';

export type AccountParams = BasicPageParams & {
  account?: string;
  nickname?: string;
  [key: string]: any;
};

export type RoleParams = {
  roleName?: string;
  status?: string;
};

export type RolePageParams = BasicPageParams & RoleParams;

export type DeptParams = {
  deptName?: string;
  status?: string;
};

export type MenuParams = {
  menuName?: string;
  status?: string;
  id?: string;
};

export interface AccountListItem {
  id: string;
  account: string;
  email: string;
  nickname: string;
  role: number;
  createTime: string;
  remark: string;
  status: number;
}

export interface DeptListItem {
  id?: string;
  orderNo?: string;
  createTime?: string;
  remark?: string;
  status?: number;
  roleId?: string;
  moduleIds?: any;
}

export interface MenuListItem {
  id: string;
  orderNo: string;
  createTime: string;
  status: number;
  icon: string;
  component: string;
  permission: string;
}

export interface RoleListItem {
  id: string;
  name: string;
  roleName: string;
  roleValue: string;
  status: number;
  orderNo: string;
  createTime: string;
}
export interface addDept {
  name: string;
  parentId: string;
  parentName: string;
  status: number;
}
export interface PositionByOrgParams {
  orgid: string;
}

/**
 * @description: Request list return value
 */
export type AccountListGetResultModel = BasicFetchResult<AccountListItem>;

export type DeptListGetResultModel = BasicFetchResult<DeptListItem>;

export type MenuListGetResultModel = BasicFetchResult<MenuListItem>;

export type RolePageListGetResultModel = BasicFetchResult<RoleListItem>;

export type RoleListGetResultModel = RoleListItem[];

export type addDeptModel = addDept[];

export type ReportParams = BasicPageParams;

export interface ReportListItem {
  id?: string;
}

export interface NoticeListItem {
  Id: string;
  msg_title: string;
  msg_content: string;
  createtime: string;
  createuser: string;
  createusername: string;
  is_delete: number;
  msg_type: number;
  case_no: string;
  caseid: string;
  is_read: number;
}

export interface UserListParams {
  key: string;
  page: number;
  limit: number;
}
export interface UserListItem {
  account: string;
  name: string;
  id: string;
}

export type UserListGetResultModel = BasicFetchResult<UserListItem>;

export interface StatisticalListItem {
  account: string;
  name: string;
  id: string;
}

export type StatisticalListGetResultModel = BasicFetchResult<StatisticalListItem>;
export type GroupParams = {
  limit?: string;
  page?: string;
  keyword?: string;
};
export interface GroupListItem {
  id: string;
  name: string;
  createTime: string;
  groupLeaderId: string;
  groupLeaderName: string;
  remark: string;
}
export type GroupListGetResultModel = BasicFetchResult<GroupListItem>;
