初始
This commit is contained in:
79
internal/app/system/model/sys_user.go
Normal file
79
internal/app/system/model/sys_user.go
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* @desc:用户模型对象
|
||||
* @company:云南奇讯科技有限公司
|
||||
* @Author: yixiaohu
|
||||
* @Date: 2022/3/7 11:47
|
||||
*/
|
||||
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/util/gmeta"
|
||||
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
|
||||
)
|
||||
|
||||
// LoginUserRes 登录返回
|
||||
type LoginUserRes struct {
|
||||
Id uint64 `orm:"id,primary" json:"id"` //
|
||||
UserName string `orm:"user_name,unique" json:"userName"` // 用户名
|
||||
UserNickname string `orm:"user_nickname" json:"userNickname"` // 用户昵称
|
||||
UserPassword string `orm:"user_password" json:"userPassword"` // 登录密码;cmf_password加密
|
||||
UserSalt string `orm:"user_salt" json:"userSalt"` // 加密盐
|
||||
UserStatus uint `orm:"user_status" json:"userStatus"` // 用户状态;0:禁用,1:正常,2:未验证
|
||||
IsAdmin int `orm:"is_admin" json:"isAdmin"` // 是否后台管理员 1 是 0 否
|
||||
IsData string `orm:"is_data" json:"isData" dc:"项目备案 1查看所有数据 2仅自己"` //
|
||||
Mobile string `orm:"mobile" json:"mobile"` //
|
||||
Avatar string `orm:"avatar" json:"avatar"` // 头像
|
||||
DeptId uint64 `orm:"dept_id" json:"deptId"` // 部门id
|
||||
OpenId string `json:"openId"` // 微信openid
|
||||
}
|
||||
|
||||
// SysUserRoleDeptRes 带有部门、角色、岗位信息的用户数据
|
||||
type SysUserRoleDeptRes struct {
|
||||
*entity.SysUser
|
||||
Dept *entity.SysDept `json:"dept"`
|
||||
RoleInfo []*SysUserRoleInfoRes `json:"roleInfo"`
|
||||
Post []*SysUserPostInfoRes `json:"post"`
|
||||
}
|
||||
|
||||
type SysUserRoleInfoRes struct {
|
||||
RoleId uint `json:"roleId"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type SysUserPostInfoRes struct {
|
||||
PostId int64 `json:"postId"`
|
||||
PostName string `json:"postName"`
|
||||
}
|
||||
|
||||
type SysUserSimpleRes struct {
|
||||
gmeta.Meta `orm:"table:sys_user"`
|
||||
Id uint64 `orm:"id" json:"id"` //
|
||||
Avatar string `orm:"avatar" json:"avatar"` // 头像
|
||||
Sex int `orm:"sex" json:"sex"` // 性别
|
||||
UserName string `orm:"user_name" json:"userName"` // 用户名
|
||||
UserNickname string `orm:"user_nickname" json:"userNickname"` // 用户昵称
|
||||
}
|
||||
|
||||
// App 用户信息
|
||||
type AppUserInfo struct {
|
||||
Avatar string `orm:"head_icon"` // 头像
|
||||
Name string `orm:"nick_name"` // 昵称
|
||||
RealName string `orm:"user_name"` // 真实姓名
|
||||
IsNewUser int `orm:"is_new_user" dc:"是否是新用户 0 否 1 是"`
|
||||
IdCard string `orm:"sfz_number"` // 身份号
|
||||
Mobile string `orm:"phone"` // 手机号
|
||||
Ginder string `orm:"sex"` // 性别
|
||||
Project string `orm:"project_name"` // 项目
|
||||
ProjectId string `orm:"id"` // 项目ID
|
||||
Lng string `orm:"lng" dc:"经度"` // 经度
|
||||
Lat string `orm:"lat" dc:"维度"` // 纬度
|
||||
ConstructionUnitName string `orm:"constructionUnitName"` // 施工单位
|
||||
WorkType string `orm:"dict_label"` // 工种
|
||||
Team string `orm:"team"` // 班组
|
||||
UserStatus string `orm:"status"` // 状态
|
||||
EntryTime string `orm:"entry_date"` // 入场时间
|
||||
LeaveTime string `orm:"leave_date"` // 离场时间
|
||||
TeamID string `orm:"team_id"` // 班组ID
|
||||
PostId int `orm:"post_id"` // 岗位ID
|
||||
}
|
Reference in New Issue
Block a user