基础项目
Some checks failed
CI / init (pull_request) Has been cancelled
CI / Frontend node 18.16.0 (pull_request) Has been cancelled
CI / Backend go (1.22) (pull_request) Has been cancelled
CI / release-pr (pull_request) Has been cancelled
CI / devops-test (1.22, 18.16.0) (pull_request) Has been cancelled
CI / release-please (pull_request) Has been cancelled
CI / devops-prod (1.22, 18.x) (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled

This commit is contained in:
2026-04-26 15:32:21 +08:00
parent cc40d743cb
commit 1e33640629
102 changed files with 4088 additions and 197 deletions

View File

@@ -0,0 +1,16 @@
package book
type BookComment struct {
HardDeleteModel
MemberUserID uint `json:"memberUserId" form:"memberUserId" gorm:"not null;index;comment:会员用户 ID"`
BookID uint `json:"bookId" form:"bookId" gorm:"not null;index;index:idx_book_comment_book_id_chapter_id_line_index;comment:书籍 ID"`
ChapterID uint `json:"chapterId" form:"chapterId" gorm:"not null;default:0;index:idx_book_comment_book_id_chapter_id_line_index;comment:章节 ID0 表示整书评论"`
LineIndex int `json:"lineIndex" form:"lineIndex" gorm:"not null;default:0;index:idx_book_comment_book_id_chapter_id_line_index;comment:文本行序号0 表示整书或整章"`
Content string `json:"content" form:"content" gorm:"type:text;not null;comment:评论内容"`
LikeCount int64 `json:"likeCount" form:"likeCount" gorm:"not null;default:0;comment:点赞聚合数"`
CommentStatus string `json:"commentStatus" form:"commentStatus" gorm:"type:varchar(32);not null;default:normal;index;comment:评论状态字典值,对应 book_comment_status"`
}
func (BookComment) TableName() string {
return "book_comment"
}