first commit

This commit is contained in:
Yangtao
2025-11-18 17:48:20 +08:00
commit 6e56cab848
196 changed files with 65809 additions and 0 deletions

View File

@ -0,0 +1,39 @@
// 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 model
import (
"time"
"gorm.io/gorm"
)
const TableNameAdminUser = "admin_user"
// AdminUser 用户表
type AdminUser struct {
ID string `gorm:"column:id;type:char(32);not null;uniqueIndex:id,priority:1;comment:业务ID" json:"id"` // 业务ID
TenantID string `gorm:"column:tenant_id;type:char(32);not null;default:system;comment:企业ID" json:"tenant_id"` // 企业ID
Username string `gorm:"column:username;type:varchar(64);not null;uniqueIndex:idx_name,priority:1;comment:用户名" json:"username"` // 用户名
Channel string `gorm:"column:channel;type:varchar(64);not null;comment:渠道ADMIN=后台维护 LDAP=统一管理获取 REGISTER=注册" json:"channel"` // 渠道ADMIN=后台维护 LDAP=统一管理获取 REGISTER=注册
ChannelCode string `gorm:"column:channel_code;type:varchar(255);not null;default:auth-center.prod" json:"channel_code"`
Nickname string `gorm:"column:nickname;type:varchar(64);not null;comment:昵称" json:"nickname"` // 昵称
Desc string `gorm:"column:desc;type:varchar(255);not null" json:"desc"`
State int32 `gorm:"column:state;type:int;not null;default:1;comment:1=启用 2=禁用" json:"state"` // 1=启用 2=禁用
Password string `gorm:"column:password;type:varchar(64);not null;comment:密码" json:"password"` // 密码
PassCipher string `gorm:"column:pass_cipher;type:varchar(64);not null;default:MD5;comment:加密方式" json:"pass_cipher"` // 加密方式
PassSalt string `gorm:"column:pass_salt;type:varchar(64);not null;comment:密码盐" json:"pass_salt"` // 密码盐
ExtID string `gorm:"column:ext_id;type:varchar(64);not null;comment:外部ID" json:"ext_id"` // 外部ID
DeleteAt *gorm.DeletedAt `gorm:"column:delete_at;type:datetime;index:idx_delete_at,priority:1;comment:del标志" json:"delete_at"` // del标志
CreateAt time.Time `gorm:"column:create_at;type:datetime;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"create_at"` // 创建时间
CreateBy string `gorm:"column:create_by;type:varchar(255);not null;comment:创建人" json:"create_by"` // 创建人
UpdateAt time.Time `gorm:"column:update_at;type:datetime;not null;index:idx_delete_at,priority:2;default:CURRENT_TIMESTAMP;comment:更新时间" json:"update_at"` // 更新时间
UpdateBy string `gorm:"column:update_by;type:varchar(255);not null;comment:更新人" json:"update_by"` // 更新人
}
// TableName AdminUser's table name
func (*AdminUser) TableName() string {
return TableNameAdminUser
}