2025-03-18 10:13:57 +08:00
|
|
|
|
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
|
|
|
|
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
|
|
|
|
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
|
|
package models
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2025-05-10 16:59:41 +08:00
|
|
|
|
"platform/web/globals/orm"
|
2025-04-11 17:36:34 +08:00
|
|
|
|
|
|
|
|
|
|
"gorm.io/gorm"
|
2025-03-18 10:13:57 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const TableNameAdmin = "admin"
|
|
|
|
|
|
|
|
|
|
|
|
// Admin mapped from table <admin>
|
|
|
|
|
|
type Admin struct {
|
2025-05-20 17:14:07 +08:00
|
|
|
|
ID int32 `gorm:"column:id;type:integer;primaryKey;autoIncrement:true;comment:管理员ID" json:"id"` // 管理员ID
|
|
|
|
|
|
Username string `gorm:"column:username;type:character varying(255);not null;comment:用户名" json:"username"` // 用户名
|
|
|
|
|
|
Password string `gorm:"column:password;type:character varying(255);not null;comment:密码" json:"password"` // 密码
|
|
|
|
|
|
Name string `gorm:"column:name;type:character varying(255);comment:真实姓名" json:"name"` // 真实姓名
|
|
|
|
|
|
Avatar string `gorm:"column:avatar;type:character varying(255);comment:头像URL" json:"avatar"` // 头像URL
|
|
|
|
|
|
Phone string `gorm:"column:phone;type:character varying(255);comment:手机号码" json:"phone"` // 手机号码
|
|
|
|
|
|
Email string `gorm:"column:email;type:character varying(255);comment:邮箱" json:"email"` // 邮箱
|
|
|
|
|
|
Status int32 `gorm:"column:status;type:integer;not null;default:1;comment:状态:0-禁用,1-正常" json:"status"` // 状态:0-禁用,1-正常
|
|
|
|
|
|
LastLogin orm.LocalDateTime `gorm:"column:last_login;type:timestamp without time zone;comment:最后登录时间" json:"last_login"` // 最后登录时间
|
|
|
|
|
|
LastLoginHost string `gorm:"column:last_login_host;type:character varying(45);comment:最后登录地址" json:"last_login_host"` // 最后登录地址
|
|
|
|
|
|
LastLoginAgent string `gorm:"column:last_login_agent;type:character varying(255);comment:最后登录代理" json:"last_login_agent"` // 最后登录代理
|
|
|
|
|
|
CreatedAt orm.LocalDateTime `gorm:"column:created_at;type:timestamp without time zone;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
|
|
|
|
|
|
UpdatedAt orm.LocalDateTime `gorm:"column:updated_at;type:timestamp without time zone;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
|
|
|
|
|
|
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp without time zone;comment:删除时间" json:"deleted_at"` // 删除时间
|
2025-03-18 10:13:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TableName Admin's table name
|
|
|
|
|
|
func (*Admin) TableName() string {
|
|
|
|
|
|
return TableNameAdmin
|
|
|
|
|
|
}
|