models.ts 1.5 KB

1234567891011121314151617181920212223242526
  1. // Model 类型定义(对齐数据表结构)
  2. export interface Model {
  3. id: number; // 主键ID(必填)
  4. title: string; // 模型标识(必填,唯一)
  5. img: string; // 图标URL(必填)
  6. name: string; // 显示名称(必填)
  7. tag1: string | null; // 主标签(可空)
  8. description: string | null; // 模型描述(可空)
  9. keyword: string | null; // 关键词(可空)
  10. time: string | null; // 发布时间(可空)
  11. tag2: string | null; // 次要标签(可空)
  12. category: number; // 主分类(兼容字段): 0=LLM, 1=多模态, 2=TTS, 3=STT, 4=生图, 5=生视频
  13. categories: number[]; // 多分类数组
  14. supplier: string | null; // 供应商(可空)
  15. price_id: number | null; // 价格ID(可空)
  16. is_featured: boolean; // 是否为精选模型(必填),用于首页推荐展示
  17. is_api_enabled?: boolean; // 是否支持API调用(可选)
  18. created_at: string; // 创建时间(必填)
  19. updated_at: string; // 更新时间(必填)
  20. pricing_mode: string | null; // 定价模式(可空)
  21. input_price: string | null; // 输入价格(可空)
  22. output_price: string | null; // 输出价格(可空)
  23. price_unit: string | null; // 价格单位(可空)
  24. price_currency: string | null; // 价格货币(可空)
  25. price_tiers: any[]; // 价格层级(可空)
  26. }