63 lines
2.8 KiB
Go
63 lines
2.8 KiB
Go
|
package model
|
||
|
|
||
|
// gen:qs
|
||
|
//
|
||
|
//go:generate goqueryset -in sys_user.go
|
||
|
type SysUser struct {
|
||
|
SysUserId
|
||
|
LoginM
|
||
|
SysUserB
|
||
|
}
|
||
|
|
||
|
type SysUserId struct {
|
||
|
UserId int `gorm:"primary_key;AUTO_INCREMENT" json:"userId"` // 编码
|
||
|
}
|
||
|
|
||
|
type UserName struct {
|
||
|
Username string `gorm:"size:64" json:"username"` // 用户名
|
||
|
}
|
||
|
|
||
|
type PassWord struct {
|
||
|
Password string `gorm:"size:128" json:"password"` // 密码
|
||
|
}
|
||
|
|
||
|
type LoginM struct {
|
||
|
UserName
|
||
|
PassWord
|
||
|
}
|
||
|
|
||
|
type SysUserB struct {
|
||
|
NickName string `gorm:"size:128" json:"nickName"` // 昵称
|
||
|
Phone string `gorm:"size:11" json:"phone"` // 手机号
|
||
|
RoleId int `gorm:"" json:"roleId"` // 角色编码
|
||
|
Salt string `gorm:"size:255" json:"salt"` // 盐
|
||
|
Avatar string `gorm:"size:255" json:"avatar"` // 头像
|
||
|
Sex string `gorm:"size:255" json:"sex"` // 性别
|
||
|
Email string `gorm:"size:128" json:"email"` // 邮箱
|
||
|
DeptId int `gorm:"" json:"deptId"` // 部门编码
|
||
|
PostId int `gorm:"" json:"postId"` // 职位编码
|
||
|
CreateBy string `gorm:"size:128" json:"createBy"` //
|
||
|
UpdateBy string `gorm:"size:128" json:"updateBy"` //
|
||
|
Remark string `gorm:"size:255" json:"remark"` // 备注
|
||
|
Status string `gorm:"size:4;" json:"status"` // 状态
|
||
|
StoreId uint32 `json:"store_id"` // 门店id
|
||
|
StoreName string `json:"store_name"` // 门店名称
|
||
|
CooperativeBusinessId uint32 `json:"cooperative_business_id" gorm:"index"` // 合作商id
|
||
|
CooperativeName string `json:"cooperative_name"` // 合作商名称
|
||
|
AccountType uint32 `json:"account_type"` // 账号类型:1-管理端
|
||
|
StoreData string `gorm:"type:json" json:"store_data,omitempty"` // 有效门店
|
||
|
StoreList []StoreInfo `gorm:"-" json:"store_list"` // 有效门店列表
|
||
|
SalesCommRate float64 `json:"sales_comm_rate"` // 销售提成比例
|
||
|
Uid uint32 `json:"uid" gorm:"column:uid;unique_index"` // 用户uid todo 待添加
|
||
|
Model
|
||
|
|
||
|
DataScope string `gorm:"-" json:"dataScope"`
|
||
|
Params string `gorm:"-" json:"params"`
|
||
|
}
|
||
|
|
||
|
type StoreInfo struct {
|
||
|
StoreID int `json:"storeId"` //门店id
|
||
|
StoreName string `json:"storeName"` //门店名称
|
||
|
ExpireTime string `json:"expireTime"` //有效期
|
||
|
}
|