// 供应商年度模板管理模块 dao 接口

declare namespace supplierAnnualTemplateManage {
  // 基础分页请求参数
  interface BasePageRequest {
    pageNo: number;
    pageSize: number;
    [property: string]: any;
  }

  // 模板列表请求参数
  interface TemplateRequest {
    basePageRequest: BasePageRequest;
    templateName?: string;
    categoryId?: string;
    tenantName?: string;
    [property: string]: any;
  }

  // 模板列表响应
  interface TemplateResponse {
    code: number;
    data: TemplateResponseData;
    message: string;
    success: boolean;
    [property: string]: any;
  }

  // 模板列表响应数据
  interface TemplateResponseData {
    countId: null;
    current: number;
    hitCount: boolean;
    maxLimit: null;
    optimizeCountSql: boolean;
    orders: any[];
    pages: number;
    records: TemplateRecord[];
    searchCount: boolean;
    size: number;
    total: number;
    [property: string]: any;
  }

  // 模板记录
  interface TemplateRecord {
    basePageRequest: null;
    categoryId: string;
    categoryLimitation: string;
    categoryName: null;
    copyTemplateId: string;
    createBy: string;
    createDate: null;
    createTime: string;
    deleteFlag: null;
    delFlag: string;
    id: string;
    lastUpdateTime: null;
    remark: null;
    status: string;
    templateName: string;
    templateType: string;
    tenantId: null;
    tenantName: null;
    updateBy: string;
    updateDate: null;
    updateTime: string;
    [property: string]: any;
  }

  // 指标记录
  interface IndicatorItem {
    isStar: string;
    itemName: string;
    orderBy: string;
    id?: string;
    createBy?: string;
    createTime?: string;
    deleteFlag?: null;
    delFlag?: string;
    lastUpdateTime?: null;
    remark?: null;
    templateId?: string;
    tenantId?: null;
    tenantName?: null;
    updateBy?: string;
    updateDate?: null;
    updateTime?: string;
    [property: string]: any;
  }

  // 新增模板请求参数
  interface AddTemplateRequest {
    categoryId?: string;
    categoryLimitation: string;
    copyTemplateId?: string;
    id?: string;
    indicatorList: IndicatorItem[];
    status: string;
    templateName: string;
    templateType?: string;
    [property: string]: any;
  }

  // API通用响应
  interface ApiResponse<T = any> {
    code: number;
    data: T;
    message: string;
    success: boolean;
    [property: string]: any;
  }

  // 获取全部模板列表响应
  interface AllTemplatesResponse {
    code: number;
    data: TemplateRecord[];
    message: string;
    success: boolean;
    [property: string]: any;
  }

  // 模板详情数据
  interface TemplateDetailData extends TemplateRecord {
    indicatorList: IndicatorItem[];
  }

  // 模板详情响应
  interface TemplateDetailResponse {
    code: number;
    data: TemplateDetailData;
    message: string;
    success: boolean;
    [property: string]: any;
  }

  // 启用禁用模板请求
  interface TemplateStatusRequest {
    id: string;
    [property: string]: any;
  }
}
