【新增】租户功能

This commit is contained in:
PandaGoAdmin
2022-07-14 18:01:54 +08:00
parent bcebb5024e
commit a6c5e581e3
8 changed files with 261 additions and 10 deletions

View File

@@ -6,20 +6,19 @@ import (
)
type SysRole struct {
model.BaseModel
RoleId int64 `json:"roleId" gorm:"primary_key;AUTO_INCREMENT"`
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:角色代码"`
RoleSort int64 `json:"roleSort" gorm:"type:int;comment:角色排序"`
DataScope string `json:"dataScope" gorm:"type:varchar(1);comment:数据范围1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限"`
Flag string `json:"flag" gorm:"type:varchar(128);comment:删除标识"`
CreateBy string `json:"createBy" gorm:"type:varchar(128);"`
UpdateBy string `json:"updateBy" gorm:"type:varchar(128);"`
Remark string `json:"remark" gorm:"type:varchar(255);"`
CreateBy string `json:"createBy" gorm:"type:varchar(128);comment:创建人"`
UpdateBy string `json:"updateBy" gorm:"type:varchar(128);comment:修改人"`
Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"`
ApiIds []casbin.CasbinRule `json:"apiIds" gorm:"-"`
MenuIds []int64 `json:"menuIds" gorm:"-"`
DeptIds []int64 `json:"deptIds" gorm:"-"`
model.BaseModel
}
type MenuIdList struct {

View File

@@ -0,0 +1,24 @@
package entity
import (
"pandax/base/model"
"time"
)
/**
* @Description
* @Author 熊猫
* @Date 2022/7/14 16:14
**/
type SysTenants struct {
model.BaseModel
TenantId int64 `json:"tenantId" gorm:"primary_key;AUTO_INCREMENT"`
TenantName string `json:"tenantName" gorm:"type:varchar(255);comment:租户名"`
Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"`
ExpireTime time.Time `json:"expireTime" gorm:"comment:过期时间"`
}
func (SysTenants) TableName() string {
return "sys_tenants"
}