优化表结构,重构模型,重新实现基于白银网关的提取节点流程
This commit is contained in:
31
web/models/admin.go
Normal file
31
web/models/admin.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"platform/web/core"
|
||||
"platform/web/globals/orm"
|
||||
)
|
||||
|
||||
// Admin 管理员表
|
||||
type Admin struct {
|
||||
core.Model
|
||||
Username string `json:"username" gorm:"column:username"` // 用户名
|
||||
Password string `json:"password" gorm:"column:password"` // 密码
|
||||
Name *string `json:"name" gorm:"column:name"` // 真实姓名
|
||||
Avatar *string `json:"avatar" gorm:"column:avatar"` // 头像URL
|
||||
Phone *string `json:"phone" gorm:"column:phone"` // 手机号码
|
||||
Email *string `json:"email" gorm:"column:email"` // 邮箱
|
||||
Status AdminStatus `json:"status" gorm:"column:status"` // 状态:0-禁用,1-正常
|
||||
LastLogin *time.Time `json:"last_login" gorm:"column:last_login"` // 最后登录时间
|
||||
LastLoginIP *orm.Inet `json:"last_login_ip" gorm:"column:last_login_ip"` // 最后登录地址
|
||||
LastLoginUA *string `json:"last_login_ua" gorm:"column:last_login_ua"` // 最后登录代理
|
||||
}
|
||||
|
||||
// AdminStatus 管理员状态枚举
|
||||
type AdminStatus int
|
||||
|
||||
const (
|
||||
AdminStatusDisabled AdminStatus = 0 // 禁用
|
||||
AdminStatusEnabled AdminStatus = 1 // 正常
|
||||
)
|
||||
Reference in New Issue
Block a user