export type BaseResultContent<T> =
  | {msg: '200'; data: T}
  | {msg: '510'; errMsg: string};

export type BaseResult<T = any> = Promise<BaseResultContent<T>>;

export type BaseListData<T> = {
  total: number;
  list: T[];
  pageNum: number;
  pageSize: number;
  size: number;
  startRow: number;
  endRow: number;
  pages: number;
  prePage: number;
  nextPage: number;
  isFirstPage: boolean;
  isLastPage: boolean;
  hasPreviousPage: boolean;
  hasNextPage: boolean;
  navigatePages: number;
  navigatepageNums: any[];
  navigateFirstPage: number;
  navigateLastPage: number;
};

/** 最后修改信息 */
export type ModifyData = {
  /** 修改人 */
  modifyUser: string;
  /** 修改时间 */
  modifyTime: string;
};

export type BaseListResult<T = any> = BaseResult<BaseListData<T>>;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export type GetBaseListType<T> = T extends BaseListResult<infer T> ? T : never;

export * from './user';
export * from './department';
export * from './menu';
export * from './role';
export * from './storage';
export * from './container';
export * from './dictionary';
export * from './material';
export * from './receive';
export * from './rawMaterial';
export * from './semiManufactures';
export * from './finishProduct';
export * from './queryList';
export * from './materialBind';
export * from './gs';
export * from './inventory';
export * from './traceBack';
