Files
knowai/types/post/enum.ts
2025-11-23 22:26:39 +08:00

30 lines
605 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 这里应该用type联合的现在有冗余和风格不统一的问题
// 排序方式枚举
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'
}