feat(api): 添加热门卡片与榜单接口及实现

- 新增热门帖子、热门作者、榜单接口及实现
- 新增api-documentation,更好的ai协作
- 修复types没有导出的问题

BREAKING CHANGES: 1.0.0->1.1.0(latest)
This commit is contained in:
tobegold574
2025-11-18 22:29:40 +08:00
parent c3a8a525cb
commit a0c907beed
28 changed files with 1074 additions and 15 deletions

31
types/model/base.ts Normal file
View File

@@ -0,0 +1,31 @@
import type { BaseEntity, BaseUser } from '../post/base';
// AI模型评论统计信息接口
export interface ModelCommentStats {
stars: number; // 收藏数
likes: number; // 点赞数
comments: number; // 评论数
replies: number; // 回复数
}
// AI模型评论接口
export interface ModelComment extends BaseEntity {
modelId: string; // 模型ID
authorId: string; // 作者ID
author: BaseUser; // 作者信息
content: string; // 评论内容
parentId?: string; // 父评论ID用于嵌套评论
stats: ModelCommentStats; // 统计信息
}
// AI模型接口
export interface AIModel {
id: string;
name: string;
description: string;
avatar?: string; // 模型头像
tags?: string[]; // 模型标签
website?: string; // 官方网站
clickCount?: number; // 点击次数
likeCount?: number; // 点赞次数
}