Documentation
¶
Index ¶
Constants ¶
View Source
const ( UserStatusNormal int8 = 0 UserStatusDisable int8 = 1 )
View Source
const ( UserSexMan int8 = 0 UserSexWoman int8 = 1 )
Variables ¶
This section is empty.
Functions ¶
func ExistsUserStatus ¶
Types ¶
type Base ¶
type Base struct { Id int64 `json:"id" gorm:"type:bigint(20);primaryKey;autoIncrement;comment:主键ID"` CreateTime time.Time `json:"createTime" gorm:"type:datetime;not null;comment:创建时间"` UpdateTime time.Time `json:"updateTime" gorm:"type:datetime;default:CURRENT_TIMESTAMP;autoUpdateTime;comment:更新时间"` }
type Dept ¶
type ExceptionLog ¶
type ExceptionLog struct { Base UserId int64 `json:"userId" gorm:"type:bigint(20);comment:登录用户的ID"` Nickname string `json:"nickname" gorm:"type:varchar(50);not null;index:idx_uname;comment:用户昵称"` Ip string `json:"ip" gorm:"type:varchar(50);comment:登录IP"` UserAgent string `json:"userAgent" gorm:"type:varchar(255);comment:浏览器的userAgent"` Path string `json:"path" gorm:"type:varchar(255);comment:请求url"` Query string `json:"query" gorm:"type:varchar(255);comment:请求url"` Body string `json:"body" gorm:"type:varchar(500);comment:body参数信息"` Error string `json:"error" gorm:"type:varchar(5000);comment:错误内容"` }
func (*ExceptionLog) TableName ¶
func (*ExceptionLog) TableName() string
type Icon ¶
type Job ¶
type LoginLog ¶
type LoginLog struct { Base UserId int64 `json:"userId" gorm:"type:bigint(20);comment:登录用户的ID"` Nickname string `json:"nickname" gorm:"type:varchar(50);not null;index:idx_uname;comment:用户昵称"` RealName string `json:"realName" gorm:"type:varchar(50);comment:用户真名"` DeptName string `json:"deptName" gorm:"type:varchar(50);comment:部门名称"` Ip string `json:"ip" gorm:"type:varchar(50);comment:登录IP"` Address string `json:"address" gorm:"type:varchar(255);comment:登录地点"` UserAgent string `json:"userAgent" gorm:"type:varchar(255);comment:浏览器的userAgent"` }
type Menu ¶
type Menu struct { Base Symbol string `json:"symbol" gorm:"type:varchar(100);index:idx_symbol;comment:权限标识"` Name string `json:"name" gorm:"type:varchar(50);not null;index:idx_name;comment:菜单名称"` Icon string `json:"icon" gorm:"type:varchar(255);comment:菜单图标"` SortNum int32 `json:"sortNum" gorm:"type:int;default:0;comment:菜单顺序"` Url string `json:"url" gorm:"type:varchar(255);comment:路由路径"` Display int8 `json:"display" gorm:"type:tinyint(4);default:0;comment:是否显示,0-否,1-是"` External int8 `json:"external" gorm:"type:tinyint(4);default:0;comment:是否外链,0-否,1-是"` ExternalWay int8 `json:"externalWay" gorm:"type:tinyint(4);default:0;comment:外链打开方式(仅外链有效),0-外联,1-内嵌"` ParentId int64 `json:"parentId" gorm:"type:bigint(20);default:0;index:idx_pid;comment:父菜单ID"` }
type OpLog ¶
type OpLog struct { Base UserId int64 `json:"userId" gorm:"type:bigint(20);comment:登录用户的ID"` Nickname string `json:"nickname" gorm:"type:varchar(50);not null;index:idx_uname;comment:用户昵称"` RealName string `json:"realName" gorm:"type:varchar(50);comment:用户真名"` DeptName string `json:"deptName" gorm:"type:varchar(50);comment:部门名称"` Ip string `json:"ip" gorm:"type:varchar(50);comment:登录IP"` Address string `json:"address" gorm:"type:varchar(255);comment:登录地点"` UserAgent string `json:"userAgent" gorm:"type:varchar(255);comment:浏览器的userAgent"` Action string `json:"action" gorm:"type:varchar(50);comment:操作名称"` Target string `json:"target" gorm:"type:varchar(50);comment:操作对象"` Path string `json:"path" gorm:"type:varchar(255);comment:请求url"` Query string `json:"query" gorm:"type:varchar(255);comment:请求url"` Body string `json:"body" gorm:"type:varchar(500);comment:body参数信息"` }
type Role ¶
type RoleMenu ¶
type RoleMenu struct { Id int64 `json:"id" gorm:"primaryKey;type:bigint(20);autoIncrement;comment:主键ID"` RoleId int64 `json:"roleId" gorm:"type:bigint(20);not null;index:idx_r_m_id,unique,priority:1;comment:角色ID"` MenuId int64 `json:"menuId" gorm:"type:bigint(20);not null;index:idx_r_m_id,unique,priority:2;index:idx_m_id;comment:菜单ID"` }
type RoleUser ¶
type RoleUser struct { Id int64 `json:"id" gorm:"primaryKey;type:bigint(20);autoIncrement;comment:主键ID"` RoleId int64 `json:"roleId" gorm:"type:bigint(20);not null;index:idx_r_u_id,unique,priority:1;comment:角色ID"` UserId int64 `json:"userId" gorm:"type:bigint(20);not null;index:idx_r_u_id,unique,priority:2;index:idx_uid;comment:用户ID"` }
type Settings ¶
type Settings struct { Id int64 `json:"id" gorm:"type:bigint(20);primaryKey;autoIncrement;comment:主键ID"` UserId int64 `json:"userId" gorm:"type:bigint(20);not null;index:idx_uid_key,unique,priority:1;comment:用户ID"` Key string `json:"key" gorm:"type:varchar(50);not null;index:idx_uid_key,unique,priority:2;comment:键名"` Value string `json:"value" gorm:"type:varchar(2048);comment:值"` }
type User ¶
type User struct { Base Name string `json:"name" gorm:"type:varchar(50);index:idx_name;comment:真实姓名"` Nickname string `json:"nickname" gorm:"type:varchar(50);index:idx_nickname;comment:昵称"` Cellphone string `json:"cellphone" gorm:"type:varchar(50);index:idx_cellphone;comment:手机号"` Email string `json:"email" gorm:"type:varchar(100);index:idx_email,unique;comment:邮箱"` Sex int8 `json:"sex" gorm:"type:tinyint(4);default:0;comment:性别,0-男,1-女"` Birthday string `json:"birthday" gorm:"type:varchar(50);comment:生日"` Status int8 `json:"status" gorm:"type:tinyint(4);default:0;comment:账号状态,0-正常,1-禁用"` Root bool `json:"root" gorm:"<-:create;type:tinyint(4);default:0;comment:是否超级用户,0-否,1-是"` DeptId int64 `json:"deptId" gorm:"type:bigint(20);default:0;comment:部门ID"` Dept *Dept `json:"dept" gorm:"-:migration;foreignKey:DeptId"` RoleList []*Role `json:"roleList" gorm:"-:migration;many2many:ops_role_user"` MenuList []*Menu `json:"menuList" gorm:"-:migration;many2many:ops_user_menu"` JobList []*Job `json:"jobList" gorm:"-:migration;many2many:ops_user_job"` }
type UserJob ¶
type UserJob struct { Id int64 `json:"id" gorm:"primaryKey;type:bigint(20);autoIncrement;comment:主键ID"` UserId int64 `json:"userId" gorm:"type:bigint(20);not null;index:idx_u_j_id,unique,priority:1;comment:用户ID"` JobId int64 `json:"jobId" gorm:"type:bigint(20);not null;index:idx_u_j_id,unique,priority:2;index:idx_j_id;comment:岗位ID"` }
type UserMenu ¶
type UserMenu struct { Id int64 `json:"id" gorm:"primaryKey;type:bigint(20);autoIncrement;comment:主键ID"` UserId int64 `json:"userId" gorm:"type:bigint(20);not null;index:idx_u_m_id,unique,priority:1;comment:用户ID"` MenuId int64 `json:"menuId" gorm:"type:bigint(20);not null;index:idx_u_m_id,unique,priority:2;index:idx_m_id;comment:菜单ID"` }
type UserPassword ¶
type UserPassword struct { Id int64 `json:"id" gorm:"primaryKey;type:bigint(20);autoIncrement;comment:主键ID"` UserId int64 `json:"userId" gorm:"type:bigint(20);not null;index:idx_uid,unique;comment:用户ID"` Password string `json:"password" gorm:"type:varchar(255);not null;comment:用户密码"` }
func (*UserPassword) TableName ¶
func (*UserPassword) TableName() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.