feat: 添加用户代理字段到评论功能,支持记录用户的用户代理信息

This commit is contained in:
2025-09-12 15:54:36 +08:00
parent f1a26f5e9c
commit f7b2022f59
4 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,7 @@ type Comment struct {
Depth int `gorm:"default:0"` // 评论的层级深度,从0开始计数
IsPrivate bool `gorm:"default:false"` // 是否为私密评论,私密评论只有评论者和被评论对象所有者可见
RemoteAddr string `gorm:"type:text"` // 远程地址
UserAgent string `gorm:"type:text"`
LikeCount uint64
CommentCount uint64
}