Merge PR #15: feat: 增强用户管理功能,添加用户名、微信号和备注字段

This commit is contained in:
shaw
2025-12-23 14:03:07 +08:00
13 changed files with 401 additions and 21 deletions

View File

@@ -11,6 +11,9 @@ import (
type User struct {
ID int64 `gorm:"primaryKey" json:"id"`
Email string `gorm:"uniqueIndex;size:255;not null" json:"email"`
Username string `gorm:"size:100;default:''" json:"username"`
Wechat string `gorm:"size:100;default:''" json:"wechat"`
Notes string `gorm:"type:text;default:''" json:"notes"`
PasswordHash string `gorm:"size:255;not null" json:"-"`
Role string `gorm:"size:20;default:user;not null" json:"role"` // admin/user
Balance float64 `gorm:"type:decimal(20,8);default:0;not null" json:"balance"`