Initial project

This commit is contained in:
Timi
2025-07-08 16:33:11 +08:00
parent 1a5a16be74
commit f862530142
80 changed files with 8301 additions and 129 deletions
+78
View File
@@ -0,0 +1,78 @@
import { Model, Page } from "./Model";
import { UserView } from "./User";
/** 评论 */
export type Comment = {
bizType: CommentBizType;
bizId: number;
userId?: number;
nick?: string;
content: string;
} & Model
/** 评论视图 */
export type CommentView = {
/** 所属用户 */
user?: UserView;
/** 回复列表 */
replies: CommentReplyView[];
/** 回复分页 */
repliesPage: CommentReplyPage;
/** 用于绑定组件当前页下标 */
repliesCurrent: number;
/** 回复数量 */
repliesLength: number;
/** 关联文章 */
article?: object;
/** 关联 Git 仓库 */
repository?: object;
} & Comment;
export type CommentReply = {
replyId?: number;
commentId: number;
senderId?: number;
senderNick?: string;
receiverId?: number;
receiverNick?: string;
content: string;
} & Model;
export type CommentReplyView = {
comment: CommentView;
sender?: UserView;
receiver?: UserView;
} & CommentReply;
export type CommentPage = {
bizType?: CommentBizType;
bizId?: number;
} & Page;
export enum CommentReplyBizType {
COMMENT = "COMMENT",
SENDER = "SENDER",
RECEIVER = "RECEIVER"
}
export type CommentReplyPage = {
bizType: CommentReplyBizType
bizId?: number
} & Page;
export enum CommentBizType {
ARTICLE = "ARTICLE",
GIT_ISSUE = "GIT_ISSUE",
GIT_MERGE = "GIT_MERGE",
}