This commit is contained in:
2026-03-18 10:19:42 +08:00
parent 2526ad4414
commit e58dd3529d
267 changed files with 25279 additions and 2 deletions

View File

View File

@@ -0,0 +1,15 @@
/*
* @desc:租户模型对象
* @company:云南奇讯科技有限公司
* @Author: yixiaohu
* @Date: 2022/3/7 11:47
*/
package model
import "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
// AreaDictRes 地区数据
type AreaDictRes struct {
*entity.AreaDict
}

View File

@@ -0,0 +1,16 @@
/*
* @desc:context-model
* @company:云南奇讯科技有限公司
* @Author: yixiaohu
* @Date: 2022/3/16 14:45
*/
package model
type Context struct {
User *ContextUser // User in context.
}
type ContextUser struct {
*LoginUserRes
}

View File

@@ -0,0 +1,20 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-03-02 16:48:23
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// AreaDict is the golang structure of table tenant for DAO operations like Where/Data.
type AreaDict struct {
g.Meta `orm:"table:area_dict, do:true"`
Id interface{} //
CityName interface{} // 城市名称
ParentId interface{} // 父级id
ShortName interface{} // 城市缩写名称
Depth interface{} // 城市层级
MergerName interface{} // 城市组合名称
}

View File

@@ -0,0 +1,27 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-03-02 16:48:23
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// ModuleTenant is the golang structure of table ModuleTenant for DAO operations like Where/Data.
type ModuleTenant struct {
g.Meta `orm:"table:module_tenant, do:true"`
Id interface{} //
CreateBy interface{} // 创建者
UpdateBy interface{} // 更新者
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
ModuleKey interface{} //模块Key
TenantId interface{} //租户ID
ExpireAt *gtime.Time //到期时间
AssetId interface{} //资产ID
AssetSkuId interface{} //资产SKU ID
TenantModuleType interface{} //租户模块类型
CertificationStatus interface{} //状态
}

View File

@@ -0,0 +1,37 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysAuthRule is the golang structure of table sys_auth_rule for DAO operations like Where/Data.
type SysAuthRule struct {
g.Meta `orm:"table:sys_auth_rule, do:true"`
Id interface{} //
Pid interface{} // 父ID
Name interface{} // 规则名称
Title interface{} // 规则名称
Icon interface{} // 图标
Condition interface{} // 条件
Remark interface{} // 备注
MenuType interface{} // 类型 0目录 1菜单 2按钮
Weigh interface{} // 权重
IsHide interface{} // 显示状态
Path interface{} // 路由地址
Component interface{} // 组件路径
IsLink interface{} // 是否外链 1是 0否
ModuleType interface{} // 所属模块
ModelId interface{} // 模型ID
IsIframe interface{} // 是否内嵌iframe
IsCached interface{} // 是否缓存
Redirect interface{} // 路由重定向地址
IsAffix interface{} // 是否固定
LinkUrl interface{} // 链接地址
CreatedAt *gtime.Time // 创建日期
UpdatedAt *gtime.Time // 修改日期
}

View File

@@ -0,0 +1,30 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysDept is the golang structure of table sys_dept for DAO operations like Where/Data.
type SysDept struct {
g.Meta `orm:"table:sys_dept, do:true"`
DeptId interface{} // 部门id
ParentId interface{} // 父部门id
Ancestors interface{} // 祖级列表
DeptName interface{} // 部门名称
OrderNum interface{} // 显示顺序
Leader interface{} // 负责人
Phone interface{} // 联系电话
Email interface{} // 邮箱
Status interface{} // 部门状态0正常 1停用
CreatedBy interface{} // 创建人
UpdatedBy interface{} // 修改人
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 修改时间
DeletedAt *gtime.Time // 删除时间
TenantId interface{} // 租户id
}

View File

@@ -0,0 +1,25 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-03-08 11:31:48
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysLoginLog is the golang structure of table sys_login_log for DAO operations like Where/Data.
type SysLoginLog struct {
g.Meta `orm:"table:sys_login_log, do:true"`
InfoId interface{} // 访问ID
LoginName interface{} // 登录账号
Ipaddr interface{} // 登录IP地址
LoginLocation interface{} // 登录地点
Browser interface{} // 浏览器类型
Os interface{} // 操作系统
Status interface{} // 登录状态0成功 1失败
Msg interface{} // 提示消息
LoginTime *gtime.Time // 登录时间
Module interface{} // 登录模块
}

View File

@@ -0,0 +1,29 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysOperLog is the golang structure of table sys_oper_log for DAO operations like Where/Data.
type SysOperLog struct {
g.Meta `orm:"table:sys_oper_log, do:true"`
OperId interface{} // 日志主键
Title interface{} // 模块标题
BusinessType interface{} // 业务类型0其它 1新增 2修改 3删除
Method interface{} // 方法名称
RequestMethod interface{} // 请求方式
OperatorType interface{} // 操作类别0其它 1后台用户 2手机端用户
OperName interface{} // 操作人员
DeptName interface{} // 部门名称
OperUrl interface{} // 请求URL
OperIp interface{} // 主机地址
OperLocation interface{} // 操作地点
OperParam interface{} // 请求参数
ErrorMsg interface{} // 错误消息
OperTime *gtime.Time // 操作时间
}

View File

@@ -0,0 +1,26 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-04-07 23:26:21
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysPost is the golang structure of table sys_post for DAO operations like Where/Data.
type SysPost struct {
g.Meta `orm:"table:sys_post, do:true"`
PostId interface{} // 岗位ID
PostCode interface{} // 岗位编码
PostName interface{} // 岗位名称
PostSort interface{} // 显示顺序
Status interface{} // 状态0正常 1停用
Remark interface{} // 备注
CreatedBy interface{} // 创建人
UpdatedBy interface{} // 修改人
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 修改时间
DeletedAt *gtime.Time // 删除时间
}

View File

@@ -0,0 +1,24 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysRole is the golang structure of table sys_role for DAO operations like Where/Data.
type SysRole struct {
g.Meta `orm:"table:sys_role, do:true"`
Id interface{} //
Status interface{} // 状态;0:禁用;1:正常
ListOrder interface{} // 排序
Name interface{} // 角色名称
Remark interface{} // 备注
DataScope interface{} // 数据范围1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
TenantId interface{} // 租户id
}

View File

@@ -0,0 +1,16 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// SysRoleDept is the golang structure of table sys_role_dept for DAO operations like Where/Data.
type SysRoleDept struct {
g.Meta `orm:"table:sys_role_dept, do:true"`
RoleId interface{} // 角色ID
DeptId interface{} // 部门ID
}

View File

@@ -0,0 +1,37 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-03-02 16:48:23
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysUser is the golang structure of table sys_user for DAO operations like Where/Data.
type SysUser struct {
g.Meta `orm:"table:sys_user, do:true"`
Id interface{} //
UserName interface{} // 用户名
Mobile interface{} // 中国手机不带国家代码,国际手机号格式为:国家代码-手机号
UserNickname interface{} // 用户昵称
Birthday interface{} // 生日
UserPassword interface{} // 登录密码;cmf_password加密
UserSalt interface{} // 加密盐
UserStatus interface{} // 用户状态;0:禁用,1:正常,2:未验证
UserEmail interface{} // 用户登录邮箱
Sex interface{} // 性别;0:保密,1:男,2:女
Avatar interface{} // 用户头像
DeptId interface{} // 部门id
Remark interface{} // 备注
IsAdmin interface{} // 是否后台管理员 1 是 0 否
Address interface{} // 联系地址
Describe interface{} // 描述信息
LastLoginIp interface{} // 最后登录ip
LastLoginTime *gtime.Time // 最后登录时间
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 删除时间
TenantId interface{} //租户id
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysUserOnline is the golang structure of table sys_user_online for DAO operations like Where/Data.
type SysUserOnline struct {
g.Meta `orm:"table:sys_user_online, do:true"`
Id interface{} //
Uuid interface{} // 用户标识
Token interface{} // 用户token
CreateTime *gtime.Time // 登录时间
UserName interface{} // 用户名
Ip interface{} // 登录ip
Explorer interface{} // 浏览器
Os interface{} // 操作系统
}

View File

@@ -0,0 +1,16 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
)
// SysUserPost is the golang structure of table sys_user_post for DAO operations like Where/Data.
type SysUserPost struct {
g.Meta `orm:"table:sys_user_post, do:true"`
UserId interface{} // 用户ID
PostId interface{} // 岗位ID
}

View File

@@ -0,0 +1,26 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-03-02 16:48:23
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// Tenant is the golang structure of table tenant for DAO operations like Where/Data.
type Tenant struct {
g.Meta `orm:"table:tenant, do:true"`
Id interface{} //
CreateBy interface{} // 创建者
UpdateBy interface{} // 更新者
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
TenantName interface{} // 租户名称
TenantType interface{} // 租户类型
CityCode interface{} // 城市编码
BusinessLicense interface{} // 营业执照
TenantSource interface{} // 租户来源
AdminBy interface{} // 管理者
}

View File

@@ -0,0 +1,16 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-03-02 16:48:23
// =================================================================================
package entity
// AreaDict is the golang structure for table tenant.
type AreaDict struct {
Id int `json:"id" description:""`
CityName string `json:"cityName" description:"城市名称"`
ParentId int `json:"parentId" description:"父级id"`
ShortName string `json:"shortName" description:"城市缩写名称"`
Depth int `json:"depth" description:"城市层级"`
MergerName string `json:"mergerName" description:"城市组合名称"`
Status int `json:"status" description:"状态"`
}

View File

@@ -0,0 +1,29 @@
/*
* @desc:模块租户关系实体
* @company:云南奇讯科技有限公司
* @Author: system
* @Date: 2026/1/6
*/
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
"github.com/tiger1103/gfast/v3/internal/app/system/consts"
)
// ModuleTenant is the golang structure for table module_tenant.
type ModuleTenant struct {
Id uint64 `json:"id" description:""`
CreateBy uint64 `json:"createBy" description:"创建者"`
UpdateBy uint64 `json:"updateBy" description:"更新者"`
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
ModuleKey string `json:"moduleKey" description:"模块Key"`
TenantId uint64 `json:"tenantId" description:"租户ID"`
ExpireAt *gtime.Time `json:"expireAt" description:"到期时间"`
AssetId string `json:"assetId" description:"资产ID"`
AssetSkuId string `json:"assetSkuId" description:"资产SKU ID"`
TenantModuleType string `json:"tenantModuleType" description:"租户模块类型"`
CertificationStatus consts.CertificationStatus `json:"certificationStatus" description:"认证状态"`
}

View File

@@ -0,0 +1,35 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysAuthRule is the golang structure for table sys_auth_rule.
type SysAuthRule struct {
Id uint `json:"id" description:""`
Pid uint `json:"pid" description:"父ID"`
Name string `json:"name" description:"规则名称"`
Title string `json:"title" description:"规则名称"`
Icon string `json:"icon" description:"图标"`
Condition string `json:"condition" description:"条件"`
Remark string `json:"remark" description:"备注"`
MenuType uint `json:"menuType" description:"类型 0目录 1菜单 2按钮"`
Weigh int `json:"weigh" description:"权重"`
IsHide uint `json:"isHide" description:"显示状态"`
Path string `json:"path" description:"路由地址"`
Component string `json:"component" description:"组件路径"`
IsLink uint `json:"isLink" description:"是否外链 1是 0否"`
ModuleType string `json:"moduleType" description:"所属模块"`
ModelId uint `json:"modelId" description:"模型ID"`
IsIframe uint `json:"isIframe" description:"是否内嵌iframe"`
IsCached uint `json:"isCached" description:"是否缓存"`
Redirect string `json:"redirect" description:"路由重定向地址"`
IsAffix uint `json:"isAffix" description:"是否固定"`
LinkUrl string `json:"linkUrl" description:"链接地址"`
CreatedAt *gtime.Time `json:"createdAt" description:"创建日期"`
UpdatedAt *gtime.Time `json:"updatedAt" description:"修改日期"`
}

View File

@@ -0,0 +1,28 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysDept is the golang structure for table sys_dept.
type SysDept struct {
DeptId uint64 `json:"deptId" description:"部门id"`
ParentId uint64 `json:"parentId" description:"父部门id"`
Ancestors string `json:"ancestors" description:"祖级列表"`
DeptName string `json:"deptName" description:"部门名称"`
OrderNum int `json:"orderNum" description:"显示顺序"`
Leader string `json:"leader" description:"负责人"`
Phone string `json:"phone" description:"联系电话"`
Email string `json:"email" description:"邮箱"`
Status uint `json:"status" description:"部门状态0正常 1停用"`
CreatedBy uint64 `json:"createdBy" description:"创建人"`
UpdatedBy int64 `json:"updatedBy" description:"修改人"`
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" description:"修改时间"`
DeletedAt *gtime.Time `json:"deletedAt" description:"删除时间"`
TenantId uint64 `json:"tenantId" description:"租户id"`
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-03-08 11:31:48
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysLoginLog is the golang structure for table sys_login_log.
type SysLoginLog struct {
InfoId int64 `json:"infoId" description:"访问ID"`
LoginName string `json:"loginName" description:"登录账号"`
Ipaddr string `json:"ipaddr" description:"登录IP地址"`
LoginLocation string `json:"loginLocation" description:"登录地点"`
Browser string `json:"browser" description:"浏览器类型"`
Os string `json:"os" description:"操作系统"`
Status int `json:"status" description:"登录状态0成功 1失败"`
Msg string `json:"msg" description:"提示消息"`
LoginTime *gtime.Time `json:"loginTime" description:"登录时间"`
Module string `json:"module" description:"登录模块"`
}

View File

@@ -0,0 +1,27 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysOperLog is the golang structure for table sys_oper_log.
type SysOperLog struct {
OperId uint64 `json:"operId" description:"日志主键"`
Title string `json:"title" description:"模块标题"`
BusinessType int `json:"businessType" description:"业务类型0其它 1新增 2修改 3删除"`
Method string `json:"method" description:"方法名称"`
RequestMethod string `json:"requestMethod" description:"请求方式"`
OperatorType int `json:"operatorType" description:"操作类别0其它 1后台用户 2手机端用户"`
OperName string `json:"operName" description:"操作人员"`
DeptName string `json:"deptName" description:"部门名称"`
OperUrl string `json:"operUrl" description:"请求URL"`
OperIp string `json:"operIp" description:"主机地址"`
OperLocation string `json:"operLocation" description:"操作地点"`
OperParam string `json:"operParam" description:"请求参数"`
ErrorMsg string `json:"errorMsg" description:"错误消息"`
OperTime *gtime.Time `json:"operTime" description:"操作时间"`
}

View File

@@ -0,0 +1,24 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-04-07 23:26:21
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysPost is the golang structure for table sys_post.
type SysPost struct {
PostId uint64 `json:"postId" description:"岗位ID"`
PostCode string `json:"postCode" description:"岗位编码"`
PostName string `json:"postName" description:"岗位名称"`
PostSort int `json:"postSort" description:"显示顺序"`
Status uint `json:"status" description:"状态0正常 1停用"`
Remark string `json:"remark" description:"备注"`
CreatedBy uint64 `json:"createdBy" description:"创建人"`
UpdatedBy uint64 `json:"updatedBy" description:"修改人"`
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" description:"修改时间"`
DeletedAt *gtime.Time `json:"deletedAt" description:"删除时间"`
}

View File

@@ -0,0 +1,22 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysRole is the golang structure for table sys_role.
type SysRole struct {
Id uint `json:"id" description:""`
Status uint `json:"status" description:"状态;0:禁用;1:正常"`
ListOrder uint `json:"listOrder" description:"排序"`
Name string `json:"name" description:"角色名称"`
Remark string `json:"remark" description:"备注"`
DataScope uint `json:"dataScope" description:"数据范围1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限"`
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
TenantId uint64 `json:"tenantId" description:"租户id"`
}

View File

@@ -0,0 +1,11 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// SysRoleDept is the golang structure for table sys_role_dept.
type SysRoleDept struct {
RoleId int64 `json:"roleId" description:"角色ID"`
DeptId int64 `json:"deptId" description:"部门ID"`
}

View File

@@ -0,0 +1,35 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-03-02 16:48:23
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysUser is the golang structure for table sys_user.
type SysUser struct {
Id uint64 `json:"id" description:""`
UserName string `json:"userName" description:"用户名"`
Mobile string `json:"mobile" description:"中国手机不带国家代码,国际手机号格式为:国家代码-手机号"`
UserNickname string `json:"userNickname" description:"用户昵称"`
Birthday int `json:"birthday" description:"生日"`
UserPassword string `json:"userPassword" description:"登录密码;cmf_password加密"`
UserSalt string `json:"userSalt" description:"加密盐"`
UserStatus uint `json:"userStatus" description:"用户状态;0:禁用,1:正常,2:未验证"`
UserEmail string `json:"userEmail" description:"用户登录邮箱"`
Sex int `json:"sex" description:"性别;0:保密,1:男,2:女"`
Avatar string `json:"avatar" description:"用户头像"`
DeptId uint64 `json:"deptId" description:"部门id"`
Remark string `json:"remark" description:"备注"`
IsAdmin int `json:"isAdmin" description:"是否后台管理员 1 是 0 否"`
Address string `json:"address" description:"联系地址"`
Describe string `json:"describe" description:"描述信息"`
LastLoginIp string `json:"lastLoginIp" description:"最后登录ip"`
LastLoginTime *gtime.Time `json:"lastLoginTime" description:"最后登录时间"`
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
DeletedAt *gtime.Time `json:"deletedAt" description:"删除时间"`
TenantId uint64 `orm:"tenantId" description:"租户id"`
}

View File

@@ -0,0 +1,21 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// SysUserOnline is the golang structure for table sys_user_online.
type SysUserOnline struct {
Id uint64 `json:"id" description:""`
Uuid string `json:"uuid" description:"用户标识"`
Token string `json:"token" description:"用户token"`
CreateTime *gtime.Time `json:"createTime" description:"登录时间"`
UserName string `json:"userName" description:"用户名"`
Ip string `json:"ip" description:"登录ip"`
Explorer string `json:"explorer" description:"浏览器"`
Os string `json:"os" description:"操作系统"`
}

View File

@@ -0,0 +1,11 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
// SysUserPost is the golang structure for table sys_user_post.
type SysUserPost struct {
UserId int64 `json:"userId" description:"用户ID"`
PostId int64 `json:"postId" description:"岗位ID"`
}

View File

@@ -0,0 +1,25 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-03-02 16:48:23
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
"github.com/tiger1103/gfast/v3/internal/app/system/consts"
)
// Tenant is the golang structure for table tenant.
type Tenant struct {
Id uint64 `json:"id" description:""`
CreateBy uint64 `json:"createBy" description:"创建者"`
UpdateBy uint64 `json:"updateBy" description:"更新者"`
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
TenantName string `json:"tenantName" description:"租户名称"`
TenantType consts.TenantType `json:"tenantType" description:"租户类型"`
CityCode string `json:"cityCode" description:"城市编码"`
BusinessLicense string `json:"businessLicense" description:"营业执照"`
TenantSource uint64 `json:"tenantSource" description:"租户来源"`
AdminBy uint64 `json:"adminBy" description:"管理者"`
}

View File

@@ -0,0 +1,22 @@
/*
* @desc:模块租户关系模型对象
* @company:云南奇讯科技有限公司
* @Author: system
* @Date: 2026/1/6
*/
package model
import "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
// ModuleTenantRes 模块租户关系数据
type ModuleTenantRes struct {
*entity.ModuleTenant
}
// ModuleTenantListRes 模块租户关系列表数据
type ModuleTenantListRes struct {
*entity.ModuleTenant
ModuleName string `orm:"module_name" json:"moduleName"` // 模块名称
TenantName string `orm:"tenant_name" json:"tenantName"` // 租户名称
}

View File

@@ -0,0 +1,59 @@
/*
* @desc:菜单model
* @company:云南奇讯科技有限公司
* @Author: yixiaohu
* @Date: 2022/3/11 14:53
*/
package model
type SysAuthRuleInfoRes struct {
Id uint `orm:"id,primary" json:"id"` //
Pid uint `orm:"pid" json:"pid"` // 父ID
Name string `orm:"name,unique" json:"name"` // 规则名称
Title string `orm:"title" json:"title"` // 规则名称
Icon string `orm:"icon" json:"icon"` // 图标
Condition string `orm:"condition" json:"condition"` // 条件
Remark string `orm:"remark" json:"remark"` // 备注
MenuType uint `orm:"menu_type" json:"menuType"` // 类型 0目录 1菜单 2按钮
Weigh int `orm:"weigh" json:"weigh"` // 权重
IsHide uint `orm:"is_hide" json:"isHide"` // 显示状态
IsCached uint `orm:"is_cached" json:"isCached"` // 是否缓存
IsAffix uint `orm:"is_affix" json:"isAffix"` //是否固定
Path string `orm:"path" json:"path"` // 路由地址
Redirect string `orm:"redirect" json:"redirect"` // 跳转路由
Component string `orm:"component" json:"component"` // 组件路径
IsIframe uint `orm:"is_iframe" json:"isIframe"` // 是否iframe
IsLink uint `orm:"is_link" json:"isLink"` // 是否外链 1是 0否
LinkUrl string `orm:"link_url" json:"linkUrl"` //链接地址
}
// SysAuthRuleTreeRes 菜单树形结构
type SysAuthRuleTreeRes struct {
*SysAuthRuleInfoRes
Children []*SysAuthRuleTreeRes `json:"children"`
}
type UserMenu struct {
Id uint `json:"id"`
Pid uint `json:"pid"`
Name string `json:"name"`
Component string `json:"component"`
Path string `json:"path"`
*MenuMeta `json:"meta"`
}
type UserMenus struct {
*UserMenu `json:""`
Children []*UserMenus `json:"children"`
}
type MenuMeta struct {
Icon string `json:"icon"`
Title string `json:"title"`
IsLink string `json:"isLink"`
IsHide bool `json:"isHide"`
IsKeepAlive bool `json:"isKeepAlive"`
IsAffix bool `json:"isAffix"`
IsIframe bool `json:"isIframe"`
}

View File

@@ -0,0 +1,15 @@
/*
* @desc:部门model
* @company:云南奇讯科技有限公司
* @Author: yixiaohu<yxh669@qq.com>
* @Date: 2022/4/11 9:07
*/
package model
import "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
type SysDeptTreeRes struct {
*entity.SysDept
Children []*SysDeptTreeRes `json:"children"`
}

View File

@@ -0,0 +1,39 @@
package model
// 程序初始化yaml配置文件
type DbInitConfig struct {
Database Database `json:"database" yaml:"database"`
Redis Redis `json:"redis" yaml:"redis"`
}
type Database struct {
Default DbDefault `json:"default" yaml:"default"`
}
type DbDefault struct {
Host string `json:"host" yaml:"host"`
Port int `json:"port" yaml:"port"`
User string `json:"user" yaml:"user"`
Pass string `json:"pass" yaml:"pass"`
Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"`
Role string `json:"role" yaml:"role"`
Debug bool `json:"debug" yaml:"debug"`
Charset string `json:"charset" yaml:"charset"`
DryRun bool `json:"dryRun" yaml:"dryRun"`
MaxIdle int `json:"maxIdle" yaml:"maxIdle"`
MaxOpen int `json:"maxOpen" yaml:"maxOpen"`
MaxLifetime int `json:"maxLifetime" yaml:"maxLifetime"`
}
type Redis struct {
Default RedisDefault `json:"default" yaml:"default"`
}
type RedisDefault struct {
Address string `json:"address" yaml:"address"`
Db int `json:"db" yaml:"db"`
Pass string `json:"pass" yaml:"pass"`
IdleTimeout int `json:"idleTimeout" yaml:"idleTimeout"`
MaxActive int `json:"maxActive" yaml:"maxActive"`
}

View File

@@ -0,0 +1,66 @@
/*
* @desc:操作日志模型对象
* @company:云南奇讯科技有限公司
* @Author: yixiaohu<yxh669@qq.com>
* @Date: 2022/9/21 16:34
*/
package model
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/util/gmeta"
"net/url"
)
// SysOperLogAdd 添加操作日志参数
type SysOperLogAdd struct {
User *ContextUser
Menu *SysAuthRuleInfoRes
Url *url.URL
Params g.Map
Method string
ClientIp string
OperatorType int
}
// SysOperLogInfoRes is the golang structure for table sys_oper_log.
type SysOperLogInfoRes struct {
gmeta.Meta `orm:"table:sys_oper_log"`
OperId uint64 `orm:"oper_id,primary" json:"operId"` // 日志编号
Title string `orm:"title" json:"title"` // 系统模块
BusinessType int `orm:"business_type" json:"businessType"` // 操作类型
Method string `orm:"method" json:"method"` // 操作方法
RequestMethod string `orm:"request_method" json:"requestMethod"` // 请求方式
OperatorType int `orm:"operator_type" json:"operatorType"` // 操作类别
OperName string `orm:"oper_name" json:"operName"` // 操作人员
DeptName string `orm:"dept_name" json:"deptName"` // 部门名称
LinkedDeptName *LinkedSysOperLogSysDept `orm:"with:dept_id=dept_name" json:"linkedDeptName"`
OperUrl string `orm:"oper_url" json:"operUrl"` // 请求URL
OperIp string `orm:"oper_ip" json:"operIp"` // 主机地址
OperLocation string `orm:"oper_location" json:"operLocation"` // 操作地点
OperParam string `orm:"oper_param" json:"operParam"` // 请求参数
ErrorMsg string `orm:"error_msg" json:"errorMsg"` // 错误消息
OperTime *gtime.Time `orm:"oper_time" json:"operTime"` // 操作时间
}
type LinkedSysOperLogSysDept struct {
gmeta.Meta `orm:"table:sys_dept"`
DeptId int64 `orm:"dept_id" json:"deptId"` // 部门id
DeptName string `orm:"dept_name" json:"deptName"` // 部门名称
}
type SysOperLogListRes struct {
OperId uint64 `json:"operId"`
Title string `json:"title"`
RequestMethod string `json:"requestMethod"`
OperName string `json:"operName"`
DeptName string `json:"deptName"`
LinkedDeptName *LinkedSysOperLogSysDept `orm:"with:dept_id=dept_name" json:"linkedDeptName"`
OperUrl string `json:"operUrl"`
OperIp string `json:"operIp"`
OperLocation string `json:"operLocation"`
OperParam string `json:"operParam"`
OperTime *gtime.Time `json:"operTime"`
}

View File

@@ -0,0 +1,8 @@
/*
* @desc:角色
* @company:云南奇讯科技有限公司
* @Author: yixiaohu<yxh669@qq.com>
* @Date: 2022/3/30 9:11
*/
package model

View File

@@ -0,0 +1,58 @@
/*
* @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 否
Avatar string `orm:"avatar" json:"avatar"` //头像
DeptId uint64 `orm:"dept_id" json:"deptId"` //部门id
TenantId uint64 `orm:"tenant_id" json:"tenantId"` //租户id
}
// SysUserRoleDeptRes 带有部门、角色、岗位信息的用户数据
type SysUserRoleDeptRes struct {
*entity.SysUser
TenantName string `json:"tenantName"`
IsOperation bool `json:"isOperation"`
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"` // 用户昵称
Mobile string `orm:"mobile" json:"mobile"` // 手机号
TenantId uint64 `orm:"tenant_id" json:"tenantId"` //租户id
}

View File

@@ -0,0 +1,18 @@
/*
* @desc:登录日志
* @company:云南奇讯科技有限公司
* @Author: yixiaohu
* @Date: 2022/3/8 11:43
*/
package model
// LoginLogParams 登录日志写入参数
type LoginLogParams struct {
Status int
Username string
Ip string
UserAgent string
Msg string
Module string
}

View File

@@ -0,0 +1,17 @@
/*
* @desc:用户在线状态
* @company:云南奇讯科技有限公司
* @Author: yixiaohu<yxh669@qq.com>
* @Date: 2023/1/10 15:08
*/
package model
// SysUserOnlineParams 用户在线状态写入参数
type SysUserOnlineParams struct {
UserAgent string
Uuid string
Token string
Username string
Ip string
}

View File

@@ -0,0 +1,16 @@
/*
* @desc:定时任务
* @company:云南奇讯科技有限公司
* @Author: yixiaohu<yxh669@qq.com>
* @Date: 2023/1/13 17:47
*/
package model
import "context"
type TimeTask struct {
FuncName string
Param []string
Run func(ctx context.Context)
}

View File

@@ -0,0 +1,25 @@
/*
* @desc:租户模型对象
* @company:云南奇讯科技有限公司
* @Author: yixiaohu
* @Date: 2022/3/7 11:47
*/
package model
import "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
// TenantRes 租户数据
type TenantRes struct {
*entity.Tenant
}
// TenantUserRes 带有用户信息的租户数据
type TenantUserRes struct {
*entity.Tenant
CityName string `orm:"city_name" json:"cityName"`
CityMergerName string `orm:"merger_name" json:"cityMergerName"`
UserName string `orm:"user_name" json:"userName"`
Mobile string `orm:"mobile" json:"mobile"`
UserNickname string `orm:"user_nickname" json:"userNickname"`
}