This commit is contained in:
XM-GO
2023-08-22 17:29:11 +08:00
parent 5be575e982
commit 3ac5ecc55a
20 changed files with 88 additions and 128 deletions

View File

@@ -2,9 +2,9 @@ package entity
import "github.com/XM-GO/PandaKit/model"
// 部门组织
type SysDept struct {
DeptId int64 `json:"deptId" gorm:"primary_key;AUTO_INCREMENT"` //部门编码
TenantId int64 `json:"tenantId" gorm:"type:int;comment:租户Id"`
ParentId int64 `json:"parentId" gorm:"type:int;comment:上级部门"`
DeptPath string `json:"deptPath" gorm:"type:varchar(255);comment:部门路径"`
DeptName string `json:"deptName" gorm:"type:varchar(128);comment:部门名称"`

View File

@@ -4,7 +4,6 @@ import "github.com/XM-GO/PandaKit/model"
type SysPost struct {
PostId int64 `gorm:"primary_key;AUTO_INCREMENT" json:"postId"`
TenantId int64 `json:"tenantId" gorm:"type:int;comment:租户Id"`
PostName string `gorm:"type:varchar(128);comment:岗位名称" json:"postName"`
PostCode string `gorm:"type:varchar(128);comment:岗位代码" json:"postCode"`
Sort int64 `gorm:"type:int;comment:岗位排序" json:"sort"`

View File

@@ -8,7 +8,6 @@ import (
type SysRole struct {
model.BaseModel
RoleId int64 `json:"roleId" gorm:"primary_key;AUTO_INCREMENT"`
TenantId int64 `json:"tenantId" gorm:"type:int"`
RoleName string `json:"roleName" gorm:"type:varchar(128);comment:角色名称"`
Status string `json:"status" gorm:"type:varchar(1);comment:状态"`
RoleKey string `json:"roleKey" gorm:"type:varchar(128);comment:角色代码"`

View File

@@ -12,23 +12,21 @@ type SysUserId struct {
}
type SysUserB struct {
TenantId int64 `gorm:"type:int" json:"tenantId"` //租户id
NickName string `gorm:"type:varchar(128)" json:"nickName"` // 昵称
Phone string `gorm:"type:varchar(11)" json:"phone"` // 手机号
RoleId int64 `gorm:"type:int" json:"roleId"` // 角色编码
Salt string `gorm:"type:varchar(255)" json:"salt"` //
Avatar string `gorm:"type:varchar(255)" json:"avatar"` //头像
Sex string `gorm:"type:varchar(255)" json:"sex"` //性别
Email string `gorm:"type:varchar(128)" json:"email"` //邮箱
DeptId int64 `gorm:"type:int" json:"deptId"` //部门编码
PostId int64 `gorm:"type:int" json:"postId"` //职位编码
RoleIds string `gorm:"type:varchar(255)" json:"roleIds"` //多角色
PostIds string `gorm:"type:varchar(255)" json:"postIds"` // 多岗位
CreateBy string `gorm:"type:varchar(128)" json:"createBy"` //
UpdateBy string `gorm:"type:varchar(128)" json:"updateBy"` //
Remark string `gorm:"type:varchar(255)" json:"remark"` //备注
Status string `gorm:"type:varchar(1);" json:"status"`
SysTenants SysTenants `gorm:"foreignKey:TenantId;references:Id" json:"tenants"`
NickName string `gorm:"type:varchar(128)" json:"nickName"` // 昵称
Phone string `gorm:"type:varchar(11)" json:"phone"` // 手机号
RoleId int64 `gorm:"type:int" json:"roleId"` // 角色编码
Salt string `gorm:"type:varchar(255)" json:"salt"` //
Avatar string `gorm:"type:varchar(255)" json:"avatar"` //头像
Sex string `gorm:"type:varchar(255)" json:"sex"` //性别
Email string `gorm:"type:varchar(128)" json:"email"` //邮箱
DeptId int64 `gorm:"type:int" json:"deptId"` //部门编码
PostId int64 `gorm:"type:int" json:"postId"` //职位编码
RoleIds string `gorm:"type:varchar(255)" json:"roleIds"` //多角色
PostIds string `gorm:"type:varchar(255)" json:"postIds"` // 多岗位
CreateBy string `gorm:"type:varchar(128)" json:"createBy"` //
UpdateBy string `gorm:"type:varchar(128)" json:"updateBy"` //
Remark string `gorm:"type:varchar(255)" json:"remark"` //备注
Status string `gorm:"type:varchar(1);" json:"status"`
model.BaseModel
}