Files
ppgo_job/model/entity/admin.go
T
lmk 610b85e3a5 refactor: 从 Beego 迁移到 GoFrame v2
- 替换 Beego 框架为 GoFrame v2
- 重构项目结构: controller/service/dao/middleware 分层
- 替换自定义 crons 包为 gcron
- 模板从 views/ 迁移到 resource/template/
- 配置从 conf/app.conf 迁移到 config.yml
- 数据库从 MySQL 切换为 SQLite (modernc.org/sqlite)
- 移除 agent/ 远程执行器(待后续迁移)
- 移除 crons/ 自定义定时器包
- 静态资源整理到 resource/static/
2026-07-09 11:06:12 +08:00

49 lines
1.6 KiB
Go

package entity
// Admin 管理员用户
type Admin struct {
Id int `orm:"id" json:"id"`
LoginName string `orm:"login_name" json:"loginName"`
RealName string `orm:"real_name" json:"realName"`
Password string `orm:"password" json:"-"`
RoleIds string `orm:"role_ids" json:"roleIds"`
Phone string `orm:"phone" json:"phone"`
Email string `orm:"email" json:"email"`
Dingtalk string `orm:"dingtalk" json:"dingtalk"`
Wechat string `orm:"wechat" json:"wechat"`
Salt string `orm:"salt" json:"-"`
LastLogin int64 `orm:"last_login" json:"lastLogin"`
LastIp string `orm:"last_ip" json:"lastIp"`
Status int `orm:"status" json:"status"`
CreateId int `orm:"create_id" json:"createId"`
UpdateId int `orm:"update_id" json:"updateId"`
CreateTime int64 `orm:"create_time" json:"createTime"`
UpdateTime int64 `orm:"update_time" json:"updateTime"`
}
// AdminCols 字段常量
var AdminCols = struct {
Id, LoginName, RealName, Password, RoleIds string
Phone, Email, Dingtalk, Wechat, Salt string
LastLogin, LastIp, Status string
CreateId, UpdateId, CreateTime, UpdateTime string
}{
Id: "id",
LoginName: "login_name",
RealName: "real_name",
Password: "password",
RoleIds: "role_ids",
Phone: "phone",
Email: "email",
Dingtalk: "dingtalk",
Wechat: "wechat",
Salt: "salt",
LastLogin: "last_login",
LastIp: "last_ip",
Status: "status",
CreateId: "create_id",
UpdateId: "update_id",
CreateTime: "create_time",
UpdateTime: "update_time",
}