feat(api): 添加热门卡片与榜单接口及实现
- 新增热门帖子、热门作者、榜单接口及实现 - 新增api-documentation,更好的ai协作 - 修复types没有导出的问题 BREAKING CHANGES: 1.0.0->1.1.0(latest)
This commit is contained in:
28
types/post/enum.ts
Normal file
28
types/post/enum.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
// 排序方式枚举
|
||||
export enum SortOrder {
|
||||
ASC = 'asc',
|
||||
DESC = 'desc'
|
||||
}
|
||||
|
||||
// 排序字段枚举
|
||||
export enum PostSortBy {
|
||||
CREATED_AT = 'createdAt',
|
||||
UPDATED_AT = 'updatedAt',
|
||||
PUBLISHED_AT = 'publishedAt',
|
||||
VIEWS = 'views',
|
||||
LIKES = 'likes',
|
||||
COMMENTS = 'comments'
|
||||
}
|
||||
|
||||
// 评论排序字段枚举
|
||||
export enum CommentSortBy {
|
||||
CREATED_AT = 'createdAt',
|
||||
LIKES = 'likes',
|
||||
REPLIES = 'replies'
|
||||
}
|
||||
|
||||
// 帖子类型枚举
|
||||
export enum PostType {
|
||||
QUESTION = 'question',
|
||||
ARTICLE = 'article'
|
||||
}
|
||||
Reference in New Issue
Block a user