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

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

// 常用返回消息
export interface responses {
  message: string;
  code: number;
  result: boolean;
}
export type responsesmodel = BasicFetchResult<responses>;

// 获取分页列表
// 查询表单分页信息
export interface getPageList_Params {
  keyword: string;
  pmoduleid: string;
  page: number;
  limit: number;
  name: string;
}
export interface getPageList {
  id: string;
  code: string;
  formCode: string;
  formVerison: string;
  icon: string;
  name: string;
  type: number;
  pmoduleId: string;
  moduleId: string;
  sortCode: number;
  enabledMark: number;
  description: string;
  createDate: string;
  createUserId: string;
  createUserName: string;
  modifyDate: string;
  modifyUserId: string;
  modifyUserName: string;
  scheme: string;
  keyWord: string;
  tenantId: string;
  isMain: number;
}
export type getPageList_ParamsModel = BasicFetchResult<getPageList_Params>;
export type getPageListModel = BasicFetchResult<getPageList>;

// 更新状态
export interface state {
  id: string;
  state: string;
}
export type stateModel = BasicFetchResult<state>;

// 删除实体数据（表单发布模板id）
// AccountParams

// 根据主键获取实体数据(编辑时使用)
export interface form {
  id: string;
  code: string;
  formCode: string;
  formVerison: string;
  icon: string;
  name: string;
  type: number;
  pmoduleId: string;
  moduleId: string;
  sortCode: number;
  enabledMark: number;
  description: string;
  createDate: string;
  createUserId: string;
  createUserName: string;
  modifyDate: string;
  modifyUserId: string;
  modifyUserName: string;
  scheme: string;
  keyWord: string;
  tenantId: string;
  isMain: number;
}
export type GetFormModel = BasicFetchResult<form>;

// 表单发布实体数据
// 表单发布实体
export interface formModuleEntity {
  id: string;
  code: string;
  formCode: string;
  formVerison: string;
  icon: string;
  name: string;
  type: number;
  pmoduleId: string;
  moduleId: string;
  sortCode: number;
  enabledMark: number;
  description: string;
  createDate: string;
  createUserId: string;
  createUserName: string;
  modifyDate: string;
  modifyUserId: string;
  modifyUserName: string;
  scheme: string;
  keyWord: string;
  tenantId: string;
  isMain: number;
}
export type formModuleEntityModel = BasicFetchResult<formModuleEntity>;
// 表单发布实体
export interface elements {
  id: string;
  domId: string;
  name: string;
  attr: string;
  script: string;
  icon: string;
  class: string;
  remark: string;
  sort: number;
  moduleId: string;
}
export interface sysModule {
  id: string;
  cascadeId: string;
  name: string;
  parentId: string;
  parentName: string;
  url: string;
  iconName: string;
  status: number;
  sortNo: number;
  code: string;
  encode: string;
  isSys: true;
  elements: elements;
}
export type sysModuleModel = BasicFetchResult<sysModule>;
// 表单发布实体
export interface sysModuleElement {
  id: string;
  domId: string;
  name: string;
  attr: string;
  script: string;
  icon: string;
  class: string;
  remark: string;
  sort: number;
  moduleId: string;
}
export type sysModuleElementModel = BasicFetchResult<sysModuleElement>;
// 表单发布实体-Column
export interface sysModuleColumn {
  moduleColumnId: string;
  moduleId: string;
  parentId: string;
  encode: string;
  fullName: string;
  sortCode: number;
  tenantId: string;
  isMain: number;
}
export type sysModuleColumnModel = BasicFetchResult<sysModuleColumn>;
// 表单发布实体
export interface sysModuleForm {
  moduleFormId: string;
  moduleId: string;
  parentId: string;
  encode: string;
  fullName: string;
  sortCode: number;
  tenantId: string;
  isMain: number;
}
export type sysModuleFormModel = BasicFetchResult<sysModuleForm>;
//
export interface formModuleModel {
  formModuleEntity: formModuleEntityModel;
  sysModule: sysModuleModel;
  sysModuleElement: sysModuleElementModel;
  sysModuleColumn: sysModuleColumnModel;
  sysModuleForm: sysModuleFormModel;
}

// 获取字典分类列表
// /api/SysDataItem/Load
export interface SysDataItemLoad {
  itemId: string;
  parentId: string;
  itemCode: string;
  itemName: string;
  isTree: number;
  isNav: number;
  sortCode: number;
  deleteMark: number;
  enabledMark: number;
  description: string;
  createDate: string;
  createUserId: string;
  createUserName: string;
  modifyDate: string;
  modifyUserId: string;
  modifyUserName: string;
  isEdit: 0;
}

export type SysDataItemLoadModel = BasicFetchResult<SysDataItemLoad>;
