import { MaterialType, YES_OR_NO } from ".";

export enum ASS_INDEX_TYPE {
  /**
   * 固定指标
   */
  FIXED = "fixed",
  /**
   * 运营指标
   */
  OPERATION = "operation",
}

export type AssIndexTreeItemType = {
  id: number;
  name: string;
  parentId: number;
  level: number;
  isPoint: YES_OR_NO;
  children: AssIndexTreeItemType[];
  disabled?: boolean;
};

export interface IAssIndexDetail {
  id: number;
  parentId: number;
  name: string;
  /** 指标编号 */
  num: string;
  remark: string;
  /** 打分点 */
  isPoint: YES_OR_NO;
  jsonPoint: string;
  /** 告警阈值 */
  isWarn: YES_OR_NO;
  jsonWarn: string;
  materials: MaterialType[];
  sort: number;
  updateTime: string;
  creatorName: string;
  level: number;
  weight: number;
  gists?: IAssInspectionItem[];
}

export interface IAssTemplateDetail {
  id: number;
  name: string;
  remark: string;
  updateTime: string;
  creatorName: string;
  normIds: string;
}

export interface IAssInspectionItem {
  id: number;
  name: string;
  one: number;
  two: number;
  three: number;
}
