Files
xuanzhi-service/server/model/book/book_comment.go
wdh-home 1e33640629
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
基础项目
2026-04-26 15:32:21 +08:00

17 lines
1.1 KiB
Go
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.
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"
}