// 基础设备数据类型
export interface BaseDeviceData {
  DataBaseName?: string;
  ProjectId?: string;
  ProjectName?: string;
  IoTDataType?: string;
  DeviceType?: string;
  DeviceId?: string;
  SubDevice?: string;
  Timestamps?: string;
  [key: string]: any; // 允许任意额外字段
}

// 动态设备数据类型
export interface DynamicDeviceData extends BaseDeviceData {
  [key: string]: any; // 允许任意字段
}

// 分页响应类型
export interface DynamicPageResponse<T = DynamicDeviceData> {
  items?: null | T[];
  totalCount?: number;
  [key: string]: any; // 允许任意额外字段
}

// 列配置类型
export interface ColumnConfig {
  field: string;
  title: string;
  minWidth?: number | string;
  width?: number | string;
  showOverflow?: boolean;
  formatter?: (value: any) => string;
  slots?: Record<string, any>; // 添加slots属性
  [key: string]: any;
}

// 字段映射配置类型
export interface FieldMapping {
  [key: string]: string;
}

// 字段类型配置类型
export interface FieldTypeConfig {
  [key: string]: {
    [key: string]: any;
    formatter?: (value: any) => string;
    minWidth?: number | string;
    slots?: Record<string, any>;
    width?: number | string;
  };
}
