更新功能

This commit is contained in:
李琦
2026-08-14 17:50:37 +08:00
parent 2f5ce02608
commit 19df9f2bfd
9 changed files with 566 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ type User struct {
Username string `gorm:"size:32;uniqueIndex" json:"username"` // 登录用户名(唯一)
Password string `gorm:"size:100" json:"-"` // bcrypt 密文(不下发给前端)
Nickname string `gorm:"size:32" json:"nickname"` // 昵称
Avatar string `gorm:"size:16" json:"avatar"` // emoji 头像
Avatar string `gorm:"size:16" json:"avatar"` // 头像(像素编码 px:01~px:32
Role int `gorm:"default:2" json:"role"` // 角色1超管 2普通
Points int `gorm:"default:0" json:"points"` // 当前积分余额
TotalPoints int `gorm:"default:0" json:"total_points"` // 历史累计积分(排行榜依据)