import { DeleteEnum, ITreeScm } from './base';

export interface ISubFeeRateOption {
  name: string;
  value: string;
  selected: boolean;
}

export interface ISubFeeRateRecord {
  ID: number;
  name: string;
  optionList: ISubFeeRateOption[];
}

export interface IFeeRateValueMap {
  ID: string;
  value: number;
}

export interface ISubFeeRate {
  records: ISubFeeRateRecord[];
  valueMaps: IFeeRateValueMap[];
}

export interface IFeeRate extends ITreeScm {
  name: string;
  rate: number;
  originalRate: number;
  memo?: string; // 备注
  subFeeRate?: ISubFeeRate;
}

export interface IFeeRateFile {
  ID: string;
  projectID: string;
  name: string;
  libID: string;
  libName: string;
  rates: IFeeRate[];
}

export interface IStdSubFeeRate {
  recodes: ISubFeeRateRecord[];
  records?: ISubFeeRateRecord[]; // 标准数据recodes拼写错误，解决拼写错误
  valueMaps: IFeeRateValueMap[];
}

export interface IStdFeeRate {
  ID: number;
  ParentID: number;
  name: string;
  rate: number;
  memo?: string;
  subFeeRate: IStdSubFeeRate;
}

export interface IStdFeeRateFile {
  ID: string;
  libName: string;
  compilationId: string;
  compilationName: string;
  rates: IStdFeeRate[];
}

export interface IResetFeeRateFilter {
  ID: string;
  libID: string;
}
