export type TouInterval = 'minute' | 'hour' | 'day' | 'month' | 'year' | 'shift';
export type TouCategory = '峰' | '平' | '谷' | '未定义';

export interface TouQuery {
  nodeIds?: string;
  beginTime?: string;
  endTime?: string;
  interval?: TouInterval;
  unified?: boolean;
}

export interface TouBucket {
  key: string;
  label: string;
}

export interface TouNodeSeries {
  nodeId: string | number;
  name: string;
  totals: Record<TouCategory, number>;
  totalsFee: Record<TouCategory, number>;
  buckets: Array<Record<TouCategory, number> & { key: string; label: string; fees: Record<TouCategory, number> }>;
}

export interface TouResult {
  beginTime: string;
  endTime: string;
  interval: TouInterval;
  unified: boolean;
  buckets: TouBucket[];
  nodes: TouNodeSeries[];
}
