/**
 * filekorolheader: 模型集成管理类型定义 - 模型服务与参数类型规范
 * 功能：模型服务接口定义、数据结构规范、枚举类型定义
 * 路径：/ai-crop-model/model-integration/management
 * 规范：遵循crop-x/docs/开发项目规范.md，使用TypeScript严格类型检查
 */

export type ModelType =
  | 'image_classification'
  | 'object_detection'
  | 'regression'
  | 'multiclass_classification'
  | 'optimization'
  | 'time_series'
  | 'nlp'
  | 'anomaly_detection';

export type ModelStatus = 'active' | 'inactive' | 'testing' | 'error';

export interface ModelMetrics {
  total_calls: number;
  avg_response_time: number;
  success_rate: number;
  accuracy: number; // 准确率
  last_called: string;
  qps: number; // 每秒查询数
}

export interface ModelService {
  id: string;
  name: string;
  type: ModelType;
  version: string;
  status: ModelStatus;
  description: string;
  apiEndpoint: string;
  parameters: Record<string, any>;
  metrics: ModelMetrics;
  tags: string[];
  visibility: 'public' | 'private' | 'team';
  team: string;
  concurrency: number;
  timeout: number;
  retryCount: number;
  createdAt: string;
  updatedAt: string;
}

export interface FilterOptions {
  searchTerm: string;
  typeFilter: ModelType | 'all';
  statusFilter: ModelStatus | 'all';
}