export interface IDataSource<T, P = unknown> {
  list: (params?: P) => Promise<T[]>;
  detail: (id: string) => Promise<T>;
  create: (data: Partial<T>) => Promise<T>;
  update: (id: string, data: Partial<T>) => Promise<T>;
  delete: (id: string) => Promise<void>;
}

export interface IMockDataSource<T> {
  reset: () => void;
  getMockData: () => T[];
}

export interface DataConfig {
  id: string;
  name: string;
  type: string;
  config: Record<string, unknown>;
  createdAt: Date;
  updatedAt: Date;
}

export interface DataBackup {
  id: string;
  name: string;
  dataId?: string;
  size: number;
  status: 'pending' | 'completed' | 'failed';
  timestamp?: Date;
  createdAt: Date;
  completedAt?: Date;
}

export interface DataStatusInfo {
  status: 'ACTIVE' | 'INACTIVE' | 'PENDING' | 'ARCHIVED' | 'UNKNOWN';
  lastUpdated: Date;
  size: number;
}

export interface DataRestore {
  id: string;
  backupId: string;
  status: 'pending' | 'completed' | 'failed';
  createdAt: Date;
  completedAt?: Date;
}

export interface DataSourceMonitoringConfig {
  id: string;
  name: string;
  type: string;
  threshold: number;
  interval: number;
  enabled: boolean;
}

export interface DataSourceMonitoringStatus {
  id: string;
  configId: string;
  status: 'healthy' | 'warning' | 'critical';
  lastCheck: Date;
  value: number;
}
