export type ElectricityBillInterval = 'minute' | 'hour' | 'day' | 'month' | 'shift';

export interface ElectricityBillQuery {
  beginTime?: string;
  endTime?: string;
  interval?: ElectricityBillInterval;
}

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

export interface ElectricityBillSeries {
  deviceId: string;
  name: string;
  type: 'bar';
  stack: string;
  data: number[];
}

export interface ElectricityBillRow {
  id: string | number;
  name: string;
  deviceId?: string;
  isDevice?: string;
  children?: ElectricityBillRow[];
  [key: string]: string | number | ElectricityBillRow[] | undefined;
}

export interface ElectricityBillResult {
  beginTime: string;
  endTime: string;
  interval: ElectricityBillInterval;
  buckets: ElectricityBillBucket[];
  series: ElectricityBillSeries[];
  tableRows: ElectricityBillRow[];
}
