初始提交:一场soul的创业实验-永平 网站与小程序

Made-with: Cursor
This commit is contained in:
卡若
2026-03-07 22:58:43 +08:00
commit b7c35a89b0
513 changed files with 89020 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package model
import (
"time"
"gorm.io/gorm"
)
// AdminUser 后台管理员用户
type AdminUser struct {
ID uint `gorm:"primaryKey" json:"id"`
Username string `gorm:"column:username;size:64;uniqueIndex;not null" json:"username"`
PasswordHash string `gorm:"column:password_hash;size:128;not null" json:"-"`
Role string `gorm:"column:role;size:32;not null;default:admin" json:"role"` // super_admin | admin
Name string `gorm:"column:name;size:64" json:"name"`
Status string `gorm:"column:status;size:16;not null;default:active" json:"status"` // active | disabled
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
}
func (AdminUser) TableName() string {
return "admin_users"
}