重构一下数据库
This commit is contained in:
@@ -11,16 +11,16 @@ import (
|
||||
|
||||
// ForumComments is the golang structure of table forum_comments for DAO operations like Where/Data.
|
||||
type ForumComments struct {
|
||||
g.Meta `orm:"table:forum_comments, do:true"`
|
||||
Id any // 评论ID(主键)
|
||||
UserId any // 评论发布者ID(关联users.id,无外键)
|
||||
PostId any // 所属帖子ID(关联forum_posts.id,无外键)
|
||||
ParentId any // 父评论ID(NULL=根评论,非NULL=回复某条评论)
|
||||
Content any // 评论内容(支持emoji)
|
||||
Status any // 评论状态:normal=正常 deleted=软删除 audit=审核中 reject=审核驳回
|
||||
LikeCount any // 点赞数
|
||||
ReplyCount any // 回复数(冗余字段)
|
||||
CreatedAt *gtime.Time // 评论创建时间
|
||||
UpdatedAt *gtime.Time // 评论更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间
|
||||
g.Meta `orm:"table:forum_comments, do:true"`
|
||||
Id any // 评论ID(主键)
|
||||
PostId any // 所属帖子ID(关联 forum_posts.id,无外键)
|
||||
UserId any // 评论发布者ID(关联 users.id,无外键)
|
||||
ParentId any // 父评论ID:NULL=一级评论;非NULL=二级评论(指向一级评论ID,无外键)
|
||||
ReplyToUserId any // 回复的用户ID(可选,用于展示“回复@xxx”,无外键)
|
||||
Content any // 评论内容(支持emoji)
|
||||
Status any // 状态:normal=正常 deleted=软删 audit=审核中 reject=驳回
|
||||
LikeCount any // 点赞数(冗余)
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user