// 应用类型
export type AppType = 'pc' | 'h5' | 'miniapp' | 'webapp';

// 应用状态
export type AppStatus = 'developing' | 'online' | 'offline' | 'maintenance';

// 应用卡片数据接口
export interface AppItem {
  id: string;
  appName: string;
  appDesc?: string;
  appIcon?: string;
  appType: AppType;
  status: AppStatus;
  version: string;
  owner: string;
  url?: string;
  tags?: string[];
  createdAt: string;
  updatedAt: string;
}

// 列表响应类型
export type AppList = {
  data: AppItem[];
  total: number;
  success: boolean;
  current?: number;
  pageSize?: number;
};

// 统计数据类型
export interface AppStats {
  total: number;
  online: number;
  developing: number;
  offline: number;
  maintenance: number;
}

// 统计响应类型
export type AppStatsResponse = {
  stats: AppStats;
  success: boolean;
};

// 查询参数类型
export interface AppParams {
  current?: number;
  pageSize?: number;
  appName?: string;
  owner?: string;
  appType?: AppType;
  status?: AppStatus;
  sorter?: Record<string, string>;
  filter?: Record<string, string[]>;
}

// 表单筛选值类型
export interface AppSearchValues {
  appName?: string;
  owner?: string;
  appType?: AppType;
  status?: AppStatus;
}
