mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-26 16:46:14 +08:00
v2.0
This commit is contained in:
0
server/internal/model/.gitkeep
Normal file
0
server/internal/model/.gitkeep
Normal file
30
server/internal/model/config.go
Normal file
30
server/internal/model/config.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package model
|
||||
|
||||
// EmailConfig 邮箱配置
|
||||
type EmailConfig struct {
|
||||
User string `json:"smtpUser"`
|
||||
Password string `json:"smtpPass"`
|
||||
Addr string `json:"smtpAddr"`
|
||||
Host string `json:"smtpHost"`
|
||||
Port int64 `json:"smtpPort"`
|
||||
SendName string `json:"smtpSendName"`
|
||||
AdminMailbox string `json:"smtpAdminMailbox"`
|
||||
}
|
||||
|
||||
// CashConfig 提现配置
|
||||
type CashConfig struct {
|
||||
Switch bool `json:"cashSwitch"`
|
||||
MinFee float64 `json:"cashMinFee"`
|
||||
MinFeeRatio float64 `json:"cashMinFeeRatio"`
|
||||
MinMoney float64 `json:"cashMinMoney"`
|
||||
Tips string `json:"cashTips"`
|
||||
}
|
||||
|
||||
///////////// 以下是本地配置
|
||||
|
||||
// SSLConfig https配置
|
||||
type SSLConfig struct {
|
||||
Switch bool `json:"switch"`
|
||||
CrtPath string `json:"crtPath"`
|
||||
KeyPath string `json:"keyPath"`
|
||||
}
|
38
server/internal/model/context.go
Normal file
38
server/internal/model/context.go
Normal file
@@ -0,0 +1,38 @@
|
||||
// Package model
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// Context 请求上下文结构
|
||||
type Context struct {
|
||||
Module string // 应用模块
|
||||
TakeUpTime int64 // 请求耗时 ms
|
||||
User *Identity // 上下文用户信息
|
||||
Response *Response // 请求响应
|
||||
Data g.Map // 自定KV变量,业务模块根据需要设置,不固定
|
||||
}
|
||||
|
||||
// Identity 通用身份模型
|
||||
type Identity struct {
|
||||
Id int64 `json:"id" description:"会员ID"`
|
||||
Username string `json:"username" description:"用户名"`
|
||||
RealName string `json:"realname" description:"昵称"`
|
||||
Avatar string `json:"avatar" description:"头像"`
|
||||
Email string `json:"email" description:"邮箱"`
|
||||
Mobile string `json:"mobile" description:"手机号码"`
|
||||
VisitCount uint `json:"visit_count" description:"访问次数"`
|
||||
LastTime int `json:"last_time" description:"最后一次登录时间"`
|
||||
LastIp string `json:"last_ip" description:"最后一次登录ip"`
|
||||
Role int64 `json:"role" description:"角色ID"`
|
||||
RoleKey string `json:"role_key" description:"角色唯一标识符"`
|
||||
Exp int64 `json:"exp" description:"登录有效期截止时间戳"`
|
||||
Expires int64 `json:"expires" description:"登录有效期"`
|
||||
App string `json:"app" description:"登录应用"`
|
||||
}
|
0
server/internal/model/do/.gitkeep
Normal file
0
server/internal/model/do/.gitkeep
Normal file
27
server/internal/model/do/admin_dept.go
Normal file
27
server/internal/model/do/admin_dept.go
Normal file
@@ -0,0 +1,27 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminDept is the golang structure of table hg_admin_dept for DAO operations like Where/Data.
|
||||
type AdminDept struct {
|
||||
g.Meta `orm:"table:hg_admin_dept, do:true"`
|
||||
Id interface{} // 部门id
|
||||
Pid interface{} // 父部门id
|
||||
Name interface{} // 部门名称
|
||||
Code interface{} // 部门编码
|
||||
Type interface{} // 部门类型
|
||||
Leader interface{} // 负责人
|
||||
Phone interface{} // 联系电话
|
||||
Email interface{} // 邮箱
|
||||
Sort interface{} // 排序
|
||||
Status interface{} // 部门状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
44
server/internal/model/do/admin_member.go
Normal file
44
server/internal/model/do/admin_member.go
Normal file
@@ -0,0 +1,44 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminMember is the golang structure of table hg_admin_member for DAO operations like Where/Data.
|
||||
type AdminMember struct {
|
||||
g.Meta `orm:"table:hg_admin_member, do:true"`
|
||||
Id interface{} //
|
||||
DeptId interface{} // 部门ID
|
||||
Username interface{} // 帐号
|
||||
PasswordHash interface{} // 密码
|
||||
Salt interface{} // 密码盐
|
||||
AuthKey interface{} // 授权令牌
|
||||
PasswordResetToken interface{} // 密码重置令牌
|
||||
Type interface{} // 1:普通管理员;10超级管理员
|
||||
Realname interface{} // 真实姓名
|
||||
Avatar interface{} // 头像
|
||||
Sex interface{} // 性别[1:男;2:女;3:未知]
|
||||
Qq interface{} // qq
|
||||
Email interface{} // 邮箱
|
||||
Birthday *gtime.Time // 生日
|
||||
ProvinceId interface{} // 省
|
||||
CityId interface{} // 城市
|
||||
AreaId interface{} // 地区
|
||||
Address interface{} // 默认地址
|
||||
Mobile interface{} // 手机号码
|
||||
HomePhone interface{} // 家庭号码
|
||||
DingtalkRobotToken interface{} // 钉钉机器人token
|
||||
VisitCount interface{} // 访问次数
|
||||
LastTime interface{} // 最后一次登录时间
|
||||
LastIp interface{} // 最后一次登录ip
|
||||
Role interface{} // 权限
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
16
server/internal/model/do/admin_member_post.go
Normal file
16
server/internal/model/do/admin_member_post.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AdminMemberPost is the golang structure of table hg_admin_member_post for DAO operations like Where/Data.
|
||||
type AdminMemberPost struct {
|
||||
g.Meta `orm:"table:hg_admin_member_post, do:true"`
|
||||
MemberId interface{} // 用户ID
|
||||
PostId interface{} // 岗位ID
|
||||
}
|
16
server/internal/model/do/admin_member_role.go
Normal file
16
server/internal/model/do/admin_member_role.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AdminMemberRole is the golang structure of table hg_admin_member_role for DAO operations like Where/Data.
|
||||
type AdminMemberRole struct {
|
||||
g.Meta `orm:"table:hg_admin_member_role, do:true"`
|
||||
MemberId interface{} // 用户ID
|
||||
RoleId interface{} // 角色ID
|
||||
}
|
41
server/internal/model/do/admin_menu.go
Normal file
41
server/internal/model/do/admin_menu.go
Normal file
@@ -0,0 +1,41 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminMenu is the golang structure of table hg_admin_menu for DAO operations like Where/Data.
|
||||
type AdminMenu struct {
|
||||
g.Meta `orm:"table:hg_admin_menu, do:true"`
|
||||
Id interface{} // 菜单ID
|
||||
Pid interface{} // 父菜单ID
|
||||
Title interface{} // 菜单名称
|
||||
Name interface{} // 名称编码
|
||||
Path interface{} // 路由地址
|
||||
Icon interface{} // 菜单图标
|
||||
Type interface{} // 菜单类型(1目录 2菜单 3按钮)
|
||||
Redirect interface{} // 重定向地址
|
||||
Permissions interface{} // 菜单包含权限集合
|
||||
PermissionName interface{} // 权限名称
|
||||
Component interface{} // 组件路径
|
||||
AlwaysShow interface{} // 取消自动计算根路由模式
|
||||
ActiveMenu interface{} // 高亮菜单编码
|
||||
IsRoot interface{} // 是否跟路由
|
||||
IsFrame interface{} // 是否内嵌
|
||||
FrameSrc interface{} // 内联外部地址
|
||||
KeepAlive interface{} // 缓存该路由
|
||||
Hidden interface{} // 是否隐藏
|
||||
Affix interface{} // 是否固定
|
||||
Level interface{} // 级别
|
||||
Tree interface{} // 树
|
||||
Sort interface{} // 排序
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 菜单状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
26
server/internal/model/do/admin_notice.go
Normal file
26
server/internal/model/do/admin_notice.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminNotice is the golang structure of table hg_admin_notice for DAO operations like Where/Data.
|
||||
type AdminNotice struct {
|
||||
g.Meta `orm:"table:hg_admin_notice, do:true"`
|
||||
Id interface{} // 公告ID
|
||||
Title interface{} // 公告标题
|
||||
Type interface{} // 公告类型(1通知 2公告)
|
||||
Content interface{} // 公告内容
|
||||
Receiver interface{} // 接收者
|
||||
Reader interface{} // 已读人
|
||||
Remark interface{} // 备注
|
||||
Sort interface{} // 排序
|
||||
Status interface{} // 公告状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
23
server/internal/model/do/admin_post.go
Normal file
23
server/internal/model/do/admin_post.go
Normal 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"
|
||||
)
|
||||
|
||||
// AdminPost is the golang structure of table hg_admin_post for DAO operations like Where/Data.
|
||||
type AdminPost struct {
|
||||
g.Meta `orm:"table:hg_admin_post, do:true"`
|
||||
Id interface{} // 岗位ID
|
||||
Code interface{} // 岗位编码
|
||||
Name interface{} // 岗位名称
|
||||
Remark interface{} // 备注
|
||||
Sort interface{} // 显示顺序
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
26
server/internal/model/do/admin_role.go
Normal file
26
server/internal/model/do/admin_role.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// AdminRole is the golang structure of table hg_admin_role for DAO operations like Where/Data.
|
||||
type AdminRole struct {
|
||||
g.Meta `orm:"table:hg_admin_role, do:true"`
|
||||
Id interface{} // 角色ID
|
||||
Name interface{} // 角色名称
|
||||
Key interface{} // 角色权限字符串
|
||||
DataScope interface{} // 数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)
|
||||
MenuCheckStrictly interface{} // 菜单树选择项是否关联显示
|
||||
DeptCheckStrictly interface{} // 部门树选择项是否关联显示
|
||||
Remark interface{} // 备注
|
||||
Sort interface{} // 排序
|
||||
Status interface{} // 角色状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
22
server/internal/model/do/admin_role_casbin.go
Normal file
22
server/internal/model/do/admin_role_casbin.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AdminRoleCasbin is the golang structure of table hg_admin_role_casbin for DAO operations like Where/Data.
|
||||
type AdminRoleCasbin struct {
|
||||
g.Meta `orm:"table:hg_admin_role_casbin, do:true"`
|
||||
Id interface{} //
|
||||
PType interface{} //
|
||||
V0 interface{} //
|
||||
V1 interface{} //
|
||||
V2 interface{} //
|
||||
V3 interface{} //
|
||||
V4 interface{} //
|
||||
V5 interface{} //
|
||||
}
|
16
server/internal/model/do/admin_role_dept.go
Normal file
16
server/internal/model/do/admin_role_dept.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AdminRoleDept is the golang structure of table hg_admin_role_dept for DAO operations like Where/Data.
|
||||
type AdminRoleDept struct {
|
||||
g.Meta `orm:"table:hg_admin_role_dept, do:true"`
|
||||
RoleId interface{} // 角色ID
|
||||
DeptId interface{} // 部门ID
|
||||
}
|
16
server/internal/model/do/admin_role_menu.go
Normal file
16
server/internal/model/do/admin_role_menu.go
Normal file
@@ -0,0 +1,16 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AdminRoleMenu is the golang structure of table hg_admin_role_menu for DAO operations like Where/Data.
|
||||
type AdminRoleMenu struct {
|
||||
g.Meta `orm:"table:hg_admin_role_menu, do:true"`
|
||||
RoleId interface{} // 角色ID
|
||||
MenuId interface{} // 菜单ID
|
||||
}
|
32
server/internal/model/do/sys_attachment.go
Normal file
32
server/internal/model/do/sys_attachment.go
Normal file
@@ -0,0 +1,32 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysAttachment is the golang structure of table hg_sys_attachment for DAO operations like Where/Data.
|
||||
type SysAttachment struct {
|
||||
g.Meta `orm:"table:hg_sys_attachment, do:true"`
|
||||
Id interface{} //
|
||||
AppId interface{} // 应用ID
|
||||
MemberId interface{} // 用户
|
||||
CateId interface{} // 分类
|
||||
Drive interface{} // 驱动
|
||||
Name interface{} // 文件原始名
|
||||
Kind interface{} // 上传类型
|
||||
MetaType interface{} // 类别
|
||||
NaiveType interface{} // NaiveUI类型
|
||||
Path interface{} // 本地路径
|
||||
FileUrl interface{} // url
|
||||
Size interface{} // 长度
|
||||
Ext interface{} // 扩展名
|
||||
Md5 interface{} // md5校验码
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
21
server/internal/model/do/sys_blacklist.go
Normal file
21
server/internal/model/do/sys_blacklist.go
Normal file
@@ -0,0 +1,21 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysBlacklist is the golang structure of table hg_sys_blacklist for DAO operations like Where/Data.
|
||||
type SysBlacklist struct {
|
||||
g.Meta `orm:"table:hg_sys_blacklist, do:true"`
|
||||
Id interface{} // 主键
|
||||
Ip interface{} // ip地址
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
28
server/internal/model/do/sys_config.go
Normal file
28
server/internal/model/do/sys_config.go
Normal file
@@ -0,0 +1,28 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysConfig is the golang structure of table hg_sys_config for DAO operations like Where/Data.
|
||||
type SysConfig struct {
|
||||
g.Meta `orm:"table:hg_sys_config, do:true"`
|
||||
Id interface{} // 配置ID
|
||||
Group interface{} // 分组
|
||||
Name interface{} // 参数名称
|
||||
Type interface{} // 类型:string,text,int,bool,array,datetime,date,file
|
||||
Key interface{} // 参数键名
|
||||
Value interface{} // 参数键值
|
||||
DefaultValue interface{} // 默认值
|
||||
Sort interface{} // 排序
|
||||
Tip interface{} // 变量描述
|
||||
IsDefault interface{} // 是否默认
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
27
server/internal/model/do/sys_cron.go
Normal file
27
server/internal/model/do/sys_cron.go
Normal file
@@ -0,0 +1,27 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysCron is the golang structure of table hg_sys_cron for DAO operations like Where/Data.
|
||||
type SysCron struct {
|
||||
g.Meta `orm:"table:hg_sys_cron, do:true"`
|
||||
Id interface{} // 主键
|
||||
GroupId interface{} // 分组ID
|
||||
Name interface{} // 任务名称
|
||||
Params interface{} // 函数参数
|
||||
Pattern interface{} // 定时表达式
|
||||
Policy interface{} // 策略
|
||||
Count interface{} // 执行次数
|
||||
Sort interface{} // 排序
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
24
server/internal/model/do/sys_cron_group.go
Normal file
24
server/internal/model/do/sys_cron_group.go
Normal 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"
|
||||
)
|
||||
|
||||
// SysCronGroup is the golang structure of table hg_sys_cron_group for DAO operations like Where/Data.
|
||||
type SysCronGroup struct {
|
||||
g.Meta `orm:"table:hg_sys_cron_group, do:true"`
|
||||
Id interface{} // 主键
|
||||
Pid interface{} // 父类ID
|
||||
Name interface{} // 分组名称
|
||||
IsDefault interface{} // 是否默认
|
||||
Sort interface{} // 排序
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
26
server/internal/model/do/sys_dict_data.go
Normal file
26
server/internal/model/do/sys_dict_data.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysDictData is the golang structure of table hg_sys_dict_data for DAO operations like Where/Data.
|
||||
type SysDictData struct {
|
||||
g.Meta `orm:"table:hg_sys_dict_data, do:true"`
|
||||
Id interface{} // 字典编码
|
||||
Label interface{} // 字典标签
|
||||
Value interface{} // 字典键值
|
||||
Type interface{} // 字典类型
|
||||
ListClass interface{} // 表格回显样式
|
||||
IsDefault interface{} // 是否默认
|
||||
Sort interface{} // 字典排序
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
24
server/internal/model/do/sys_dict_type.go
Normal file
24
server/internal/model/do/sys_dict_type.go
Normal 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"
|
||||
)
|
||||
|
||||
// SysDictType is the golang structure of table hg_sys_dict_type for DAO operations like Where/Data.
|
||||
type SysDictType struct {
|
||||
g.Meta `orm:"table:hg_sys_dict_type, do:true"`
|
||||
Id interface{} // 字典主键
|
||||
Pid interface{} // 父类ID
|
||||
Name interface{} // 字典名称
|
||||
Type interface{} // 字典类型
|
||||
Sort interface{} // 排序
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
38
server/internal/model/do/sys_log.go
Normal file
38
server/internal/model/do/sys_log.go
Normal file
@@ -0,0 +1,38 @@
|
||||
// =================================================================================
|
||||
// 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"
|
||||
)
|
||||
|
||||
// SysLog is the golang structure of table hg_sys_log for DAO operations like Where/Data.
|
||||
type SysLog struct {
|
||||
g.Meta `orm:"table:hg_sys_log, do:true"`
|
||||
Id interface{} //
|
||||
AppId interface{} // 应用id
|
||||
MerchantId interface{} // 商户id
|
||||
MemberId interface{} // 用户id
|
||||
Method interface{} // 提交类型
|
||||
Module interface{} // 模块
|
||||
Url interface{} // 提交url
|
||||
GetData interface{} // get数据
|
||||
PostData interface{} // post数据
|
||||
HeaderData interface{} // header数据
|
||||
Ip interface{} // ip地址
|
||||
ProvinceId interface{} // 省编码
|
||||
CityId interface{} // 市编码
|
||||
ErrorCode interface{} // 报错code
|
||||
ErrorMsg interface{} // 报错信息
|
||||
ErrorData interface{} // 报错日志
|
||||
ReqId interface{} // 对外id
|
||||
Timestamp interface{} // 响应时间
|
||||
UserAgent interface{} // UA信息
|
||||
TakeUpTime interface{} // 请求耗时
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
30
server/internal/model/do/sys_provinces.go
Normal file
30
server/internal/model/do/sys_provinces.go
Normal 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"
|
||||
)
|
||||
|
||||
// SysProvinces is the golang structure of table hg_sys_provinces for DAO operations like Where/Data.
|
||||
type SysProvinces struct {
|
||||
g.Meta `orm:"table:hg_sys_provinces, do:true"`
|
||||
Id interface{} // ID
|
||||
Title interface{} // 栏目名
|
||||
Pid interface{} // 父栏目
|
||||
ShortTitle interface{} // 缩写
|
||||
Areacode interface{} // 区域编码
|
||||
Zipcode interface{} // 邮政编码
|
||||
Pinyin interface{} // 拼音
|
||||
Lng interface{} // 经度
|
||||
Lat interface{} // 纬度
|
||||
Level interface{} // 级别
|
||||
Tree interface{} //
|
||||
Sort interface{} // 排序
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
0
server/internal/model/entity/.gitkeep
Normal file
0
server/internal/model/entity/.gitkeep
Normal file
25
server/internal/model/entity/admin_dept.go
Normal file
25
server/internal/model/entity/admin_dept.go
Normal file
@@ -0,0 +1,25 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminDept is the golang structure for table admin_dept.
|
||||
type AdminDept struct {
|
||||
Id int64 `json:"id" description:"部门id"`
|
||||
Pid int64 `json:"pid" description:"父部门id"`
|
||||
Name string `json:"name" description:"部门名称"`
|
||||
Code string `json:"code" description:"部门编码"`
|
||||
Type string `json:"type" description:"部门类型"`
|
||||
Leader string `json:"leader" description:"负责人"`
|
||||
Phone string `json:"phone" description:"联系电话"`
|
||||
Email string `json:"email" description:"邮箱"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Status int `json:"status" description:"部门状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
42
server/internal/model/entity/admin_member.go
Normal file
42
server/internal/model/entity/admin_member.go
Normal file
@@ -0,0 +1,42 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminMember is the golang structure for table admin_member.
|
||||
type AdminMember struct {
|
||||
Id int64 `json:"id" description:""`
|
||||
DeptId int64 `json:"deptId" description:"部门ID"`
|
||||
Username string `json:"username" description:"帐号"`
|
||||
PasswordHash string `json:"passwordHash" description:"密码"`
|
||||
Salt string `json:"salt" description:"密码盐"`
|
||||
AuthKey string `json:"authKey" description:"授权令牌"`
|
||||
PasswordResetToken string `json:"passwordResetToken" description:"密码重置令牌"`
|
||||
Type string `json:"type" description:"1:普通管理员;10超级管理员"`
|
||||
Realname string `json:"realname" description:"真实姓名"`
|
||||
Avatar string `json:"avatar" description:"头像"`
|
||||
Sex int `json:"sex" description:"性别[1:男;2:女;3:未知]"`
|
||||
Qq string `json:"qq" description:"qq"`
|
||||
Email string `json:"email" description:"邮箱"`
|
||||
Birthday *gtime.Time `json:"birthday" description:"生日"`
|
||||
ProvinceId int `json:"provinceId" description:"省"`
|
||||
CityId int `json:"cityId" description:"城市"`
|
||||
AreaId int `json:"areaId" description:"地区"`
|
||||
Address string `json:"address" description:"默认地址"`
|
||||
Mobile string `json:"mobile" description:"手机号码"`
|
||||
HomePhone string `json:"homePhone" description:"家庭号码"`
|
||||
DingtalkRobotToken string `json:"dingtalkRobotToken" description:"钉钉机器人token"`
|
||||
VisitCount uint `json:"visitCount" description:"访问次数"`
|
||||
LastTime int `json:"lastTime" description:"最后一次登录时间"`
|
||||
LastIp string `json:"lastIp" description:"最后一次登录ip"`
|
||||
Role int64 `json:"role" description:"权限"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"修改时间"`
|
||||
}
|
11
server/internal/model/entity/admin_member_post.go
Normal file
11
server/internal/model/entity/admin_member_post.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
// AdminMemberPost is the golang structure for table admin_member_post.
|
||||
type AdminMemberPost struct {
|
||||
MemberId int64 `json:"memberId" description:"用户ID"`
|
||||
PostId int64 `json:"postId" description:"岗位ID"`
|
||||
}
|
11
server/internal/model/entity/admin_member_role.go
Normal file
11
server/internal/model/entity/admin_member_role.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
// AdminMemberRole is the golang structure for table admin_member_role.
|
||||
type AdminMemberRole struct {
|
||||
MemberId int64 `json:"memberId" description:"用户ID"`
|
||||
RoleId int64 `json:"roleId" description:"角色ID"`
|
||||
}
|
39
server/internal/model/entity/admin_menu.go
Normal file
39
server/internal/model/entity/admin_menu.go
Normal file
@@ -0,0 +1,39 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminMenu is the golang structure for table admin_menu.
|
||||
type AdminMenu struct {
|
||||
Id int64 `json:"id" description:"菜单ID"`
|
||||
Pid int64 `json:"pid" description:"父菜单ID"`
|
||||
Title string `json:"title" description:"菜单名称"`
|
||||
Name string `json:"name" description:"名称编码"`
|
||||
Path string `json:"path" description:"路由地址"`
|
||||
Icon string `json:"icon" description:"菜单图标"`
|
||||
Type int `json:"type" description:"菜单类型(1目录 2菜单 3按钮)"`
|
||||
Redirect string `json:"redirect" description:"重定向地址"`
|
||||
Permissions string `json:"permissions" description:"菜单包含权限集合"`
|
||||
PermissionName string `json:"permissionName" description:"权限名称"`
|
||||
Component string `json:"component" description:"组件路径"`
|
||||
AlwaysShow int `json:"alwaysShow" description:"取消自动计算根路由模式"`
|
||||
ActiveMenu string `json:"activeMenu" description:"高亮菜单编码"`
|
||||
IsRoot int `json:"isRoot" description:"是否跟路由"`
|
||||
IsFrame int `json:"isFrame" description:"是否内嵌"`
|
||||
FrameSrc string `json:"frameSrc" description:"内联外部地址"`
|
||||
KeepAlive int `json:"keepAlive" description:"缓存该路由"`
|
||||
Hidden int `json:"hidden" description:"是否隐藏"`
|
||||
Affix int `json:"affix" description:"是否固定"`
|
||||
Level int `json:"level" description:"级别"`
|
||||
Tree string `json:"tree" description:"树"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Status int `json:"status" description:"菜单状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
24
server/internal/model/entity/admin_notice.go
Normal file
24
server/internal/model/entity/admin_notice.go
Normal file
@@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminNotice is the golang structure for table admin_notice.
|
||||
type AdminNotice struct {
|
||||
Id int64 `json:"id" description:"公告ID"`
|
||||
Title string `json:"title" description:"公告标题"`
|
||||
Type int64 `json:"type" description:"公告类型(1通知 2公告)"`
|
||||
Content string `json:"content" description:"公告内容"`
|
||||
Receiver string `json:"receiver" description:"接收者"`
|
||||
Reader string `json:"reader" description:"已读人"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Status int `json:"status" description:"公告状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
21
server/internal/model/entity/admin_post.go
Normal file
21
server/internal/model/entity/admin_post.go
Normal file
@@ -0,0 +1,21 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminPost is the golang structure for table admin_post.
|
||||
type AdminPost struct {
|
||||
Id int64 `json:"id" description:"岗位ID"`
|
||||
Code string `json:"code" description:"岗位编码"`
|
||||
Name string `json:"name" description:"岗位名称"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Sort int `json:"sort" description:"显示顺序"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
24
server/internal/model/entity/admin_role.go
Normal file
24
server/internal/model/entity/admin_role.go
Normal file
@@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminRole is the golang structure for table admin_role.
|
||||
type AdminRole struct {
|
||||
Id int64 `json:"id" description:"角色ID"`
|
||||
Name string `json:"name" description:"角色名称"`
|
||||
Key string `json:"key" description:"角色权限字符串"`
|
||||
DataScope int `json:"dataScope" description:"数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)"`
|
||||
MenuCheckStrictly int `json:"menuCheckStrictly" description:"菜单树选择项是否关联显示"`
|
||||
DeptCheckStrictly int `json:"deptCheckStrictly" description:"部门树选择项是否关联显示"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Status int `json:"status" description:"角色状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
17
server/internal/model/entity/admin_role_casbin.go
Normal file
17
server/internal/model/entity/admin_role_casbin.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
// AdminRoleCasbin is the golang structure for table admin_role_casbin.
|
||||
type AdminRoleCasbin struct {
|
||||
Id int64 `json:"id" description:""`
|
||||
PType string `json:"pType" description:""`
|
||||
V0 string `json:"v0" description:""`
|
||||
V1 string `json:"v1" description:""`
|
||||
V2 string `json:"v2" description:""`
|
||||
V3 string `json:"v3" description:""`
|
||||
V4 string `json:"v4" description:""`
|
||||
V5 string `json:"v5" description:""`
|
||||
}
|
11
server/internal/model/entity/admin_role_dept.go
Normal file
11
server/internal/model/entity/admin_role_dept.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
// AdminRoleDept is the golang structure for table admin_role_dept.
|
||||
type AdminRoleDept struct {
|
||||
RoleId int64 `json:"roleId" description:"角色ID"`
|
||||
DeptId int64 `json:"deptId" description:"部门ID"`
|
||||
}
|
11
server/internal/model/entity/admin_role_menu.go
Normal file
11
server/internal/model/entity/admin_role_menu.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
// AdminRoleMenu is the golang structure for table admin_role_menu.
|
||||
type AdminRoleMenu struct {
|
||||
RoleId int64 `json:"roleId" description:"角色ID"`
|
||||
MenuId int64 `json:"menuId" description:"菜单ID"`
|
||||
}
|
30
server/internal/model/entity/sys_attachment.go
Normal file
30
server/internal/model/entity/sys_attachment.go
Normal file
@@ -0,0 +1,30 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysAttachment is the golang structure for table sys_attachment.
|
||||
type SysAttachment struct {
|
||||
Id int64 `json:"id" description:""`
|
||||
AppId string `json:"appId" description:"应用ID"`
|
||||
MemberId int64 `json:"memberId" description:"用户"`
|
||||
CateId uint64 `json:"cateId" description:"分类"`
|
||||
Drive string `json:"drive" description:"驱动"`
|
||||
Name string `json:"name" description:"文件原始名"`
|
||||
Kind string `json:"kind" description:"上传类型"`
|
||||
MetaType string `json:"metaType" description:"类别"`
|
||||
NaiveType string `json:"naiveType" description:"NaiveUI类型"`
|
||||
Path string `json:"path" description:"本地路径"`
|
||||
FileUrl string `json:"fileUrl" description:"url"`
|
||||
Size int64 `json:"size" description:"长度"`
|
||||
Ext string `json:"ext" description:"扩展名"`
|
||||
Md5 string `json:"md5" description:"md5校验码"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"修改时间"`
|
||||
}
|
19
server/internal/model/entity/sys_blacklist.go
Normal file
19
server/internal/model/entity/sys_blacklist.go
Normal file
@@ -0,0 +1,19 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysBlacklist is the golang structure for table sys_blacklist.
|
||||
type SysBlacklist struct {
|
||||
Id int64 `json:"id" description:"主键"`
|
||||
Ip string `json:"ip" description:"ip地址"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
26
server/internal/model/entity/sys_config.go
Normal file
26
server/internal/model/entity/sys_config.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysConfig is the golang structure for table sys_config.
|
||||
type SysConfig struct {
|
||||
Id int64 `json:"id" description:"配置ID"`
|
||||
Group string `json:"group" description:"分组"`
|
||||
Name string `json:"name" description:"参数名称"`
|
||||
Type string `json:"type" description:"类型:string,text,int,bool,array,datetime,date,file"`
|
||||
Key string `json:"key" description:"参数键名"`
|
||||
Value string `json:"value" description:"参数键值"`
|
||||
DefaultValue string `json:"defaultValue" description:"默认值"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Tip string `json:"tip" description:"变量描述"`
|
||||
IsDefault int `json:"isDefault" description:"是否默认"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
25
server/internal/model/entity/sys_cron.go
Normal file
25
server/internal/model/entity/sys_cron.go
Normal file
@@ -0,0 +1,25 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysCron is the golang structure for table sys_cron.
|
||||
type SysCron struct {
|
||||
Id int64 `json:"id" description:"主键"`
|
||||
GroupId int64 `json:"groupId" description:"分组ID"`
|
||||
Name string `json:"name" description:"任务名称"`
|
||||
Params string `json:"params" description:"函数参数"`
|
||||
Pattern string `json:"pattern" description:"定时表达式"`
|
||||
Policy int64 `json:"policy" description:"策略"`
|
||||
Count int64 `json:"count" description:"执行次数"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
22
server/internal/model/entity/sys_cron_group.go
Normal file
22
server/internal/model/entity/sys_cron_group.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysCronGroup is the golang structure for table sys_cron_group.
|
||||
type SysCronGroup struct {
|
||||
Id int64 `json:"id" description:"主键"`
|
||||
Pid int64 `json:"pid" description:"父类ID"`
|
||||
Name string `json:"name" description:"分组名称"`
|
||||
IsDefault int `json:"isDefault" description:"是否默认"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
24
server/internal/model/entity/sys_dict_data.go
Normal file
24
server/internal/model/entity/sys_dict_data.go
Normal file
@@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysDictData is the golang structure for table sys_dict_data.
|
||||
type SysDictData struct {
|
||||
Id int64 `json:"id" description:"字典编码"`
|
||||
Label string `json:"label" description:"字典标签"`
|
||||
Value string `json:"value" description:"字典键值"`
|
||||
Type string `json:"type" description:"字典类型"`
|
||||
ListClass string `json:"listClass" description:"表格回显样式"`
|
||||
IsDefault int `json:"isDefault" description:"是否默认"`
|
||||
Sort int `json:"sort" description:"字典排序"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
22
server/internal/model/entity/sys_dict_type.go
Normal file
22
server/internal/model/entity/sys_dict_type.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysDictType is the golang structure for table sys_dict_type.
|
||||
type SysDictType struct {
|
||||
Id int64 `json:"id" description:"字典主键"`
|
||||
Pid int64 `json:"pid" description:"父类ID"`
|
||||
Name string `json:"name" description:"字典名称"`
|
||||
Type string `json:"type" description:"字典类型"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
36
server/internal/model/entity/sys_log.go
Normal file
36
server/internal/model/entity/sys_log.go
Normal file
@@ -0,0 +1,36 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysLog is the golang structure for table sys_log.
|
||||
type SysLog struct {
|
||||
Id int64 `json:"id" description:""`
|
||||
AppId string `json:"appId" description:"应用id"`
|
||||
MerchantId uint64 `json:"merchantId" description:"商户id"`
|
||||
MemberId int64 `json:"memberId" description:"用户id"`
|
||||
Method string `json:"method" description:"提交类型"`
|
||||
Module string `json:"module" description:"模块"`
|
||||
Url string `json:"url" description:"提交url"`
|
||||
GetData string `json:"getData" description:"get数据"`
|
||||
PostData string `json:"postData" description:"post数据"`
|
||||
HeaderData string `json:"headerData" description:"header数据"`
|
||||
Ip string `json:"ip" description:"ip地址"`
|
||||
ProvinceId int64 `json:"provinceId" description:"省编码"`
|
||||
CityId int64 `json:"cityId" description:"市编码"`
|
||||
ErrorCode int `json:"errorCode" description:"报错code"`
|
||||
ErrorMsg string `json:"errorMsg" description:"报错信息"`
|
||||
ErrorData string `json:"errorData" description:"报错日志"`
|
||||
ReqId string `json:"reqId" description:"对外id"`
|
||||
Timestamp int64 `json:"timestamp" description:"响应时间"`
|
||||
UserAgent string `json:"userAgent" description:"UA信息"`
|
||||
TakeUpTime int64 `json:"takeUpTime" description:"请求耗时"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"修改时间"`
|
||||
}
|
28
server/internal/model/entity/sys_provinces.go
Normal file
28
server/internal/model/entity/sys_provinces.go
Normal file
@@ -0,0 +1,28 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysProvinces is the golang structure for table sys_provinces.
|
||||
type SysProvinces struct {
|
||||
Id int64 `json:"id" description:"ID"`
|
||||
Title string `json:"title" description:"栏目名"`
|
||||
Pid int64 `json:"pid" description:"父栏目"`
|
||||
ShortTitle string `json:"shortTitle" description:"缩写"`
|
||||
Areacode int `json:"areacode" description:"区域编码"`
|
||||
Zipcode int `json:"zipcode" description:"邮政编码"`
|
||||
Pinyin string `json:"pinyin" description:"拼音"`
|
||||
Lng string `json:"lng" description:"经度"`
|
||||
Lat string `json:"lat" description:"纬度"`
|
||||
Level int `json:"level" description:"级别"`
|
||||
Tree string `json:"tree" description:""`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
}
|
92
server/internal/model/input/adminin/dept.go
Normal file
92
server/internal/model/input/adminin/dept.go
Normal file
@@ -0,0 +1,92 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/model/entity"
|
||||
)
|
||||
|
||||
// DeptNameUniqueInp 名称是否唯一
|
||||
type DeptNameUniqueInp struct {
|
||||
Name string
|
||||
Id int64
|
||||
}
|
||||
|
||||
type DeptNameUniqueModel struct {
|
||||
IsUnique bool
|
||||
}
|
||||
|
||||
// DeptMaxSortInp 最大排序
|
||||
type DeptMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type DeptMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// DeptEditInp 修改/新增字典数据
|
||||
type DeptEditInp struct {
|
||||
entity.AdminDept
|
||||
}
|
||||
type DeptEditModel struct{}
|
||||
|
||||
// DeptDeleteInp 删除字典类型
|
||||
type DeptDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type DeptDeleteModel struct{}
|
||||
|
||||
// DeptViewInp 获取信息
|
||||
type DeptViewInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type DeptViewModel struct {
|
||||
entity.AdminDept
|
||||
}
|
||||
|
||||
// DeptListInp 获取列表
|
||||
type DeptListInp struct {
|
||||
Name string
|
||||
Code string
|
||||
}
|
||||
|
||||
// DeptTreeDept 树
|
||||
type DeptTreeDept struct {
|
||||
entity.AdminDept
|
||||
Children []*DeptTreeDept `json:"children"`
|
||||
}
|
||||
|
||||
type DeptListModel []g.Map
|
||||
|
||||
// DeptListTreeInp 获取列表树
|
||||
type DeptListTreeInp struct {
|
||||
Name string
|
||||
Code string
|
||||
}
|
||||
|
||||
// DeptListTreeDept 树
|
||||
type DeptListTreeDept struct {
|
||||
Id int64 `json:"id" `
|
||||
Key int64 `json:"key" `
|
||||
Pid int64 `json:"pid" `
|
||||
Label string `json:"label"`
|
||||
Title string `json:"title"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Children []*DeptListTreeDept `json:"children"`
|
||||
}
|
||||
|
||||
type DeptListTreeModel DeptListTreeDept
|
||||
|
||||
// DeptStatusInp 更新部门状态
|
||||
type DeptStatusInp struct {
|
||||
entity.AdminDept
|
||||
}
|
||||
type DeptStatusModel struct{}
|
192
server/internal/model/input/adminin/member.go
Normal file
192
server/internal/model/input/adminin/member.go
Normal file
@@ -0,0 +1,192 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// GetIdByCodeInp 通过邀请码获取会员ID
|
||||
type GetIdByCodeInp struct {
|
||||
Code string `json:"code""`
|
||||
}
|
||||
type GetIdByCodeModel struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
// MemberProfileInp 获取指定会员资料
|
||||
type MemberProfileInp struct {
|
||||
Id int64
|
||||
}
|
||||
type MemberProfileModel struct {
|
||||
PostGroup string `json:"postGroup" description:"岗位名称"`
|
||||
RoleGroup string `json:"roleGroup" description:"角色名称"`
|
||||
User *MemberViewModel `json:"member" description:"用户基本信息"`
|
||||
SysDept *DeptViewModel `json:"sysDept" description:"部门信息"`
|
||||
SysRoles []*RoleListModel `json:"sysRoles" description:"角色列表"`
|
||||
PostIds int64 `json:"postIds" description:"当前岗位"`
|
||||
RoleIds int64 `json:"roleIds" description:"当前角色"`
|
||||
}
|
||||
|
||||
// MemberUpdateProfileInp 更新会员资料
|
||||
type MemberUpdateProfileInp struct {
|
||||
Mobile int
|
||||
Email string
|
||||
Realname string
|
||||
}
|
||||
|
||||
// MemberUpdatePwdInp 修改登录密码
|
||||
type MemberUpdatePwdInp struct {
|
||||
Id int64
|
||||
OldPassword string
|
||||
NewPassword string
|
||||
}
|
||||
|
||||
// MemberResetPwdInp 重置密码
|
||||
type MemberResetPwdInp struct {
|
||||
Password string
|
||||
Id int64
|
||||
}
|
||||
|
||||
// MemberEmailUniqueInp 邮箱是否唯一
|
||||
type MemberEmailUniqueInp struct {
|
||||
Email string
|
||||
Id int64
|
||||
}
|
||||
|
||||
type MemberEmailUniqueModel struct {
|
||||
IsUnique bool
|
||||
}
|
||||
|
||||
// MemberMobileUniqueInp 手机号是否唯一
|
||||
type MemberMobileUniqueInp struct {
|
||||
Mobile string
|
||||
Id int64
|
||||
}
|
||||
|
||||
type MemberMobileUniqueModel struct {
|
||||
IsUnique bool
|
||||
}
|
||||
|
||||
// MemberNameUniqueInp 名称是否唯一
|
||||
type MemberNameUniqueInp struct {
|
||||
Username string
|
||||
Id int64
|
||||
}
|
||||
|
||||
type MemberNameUniqueModel struct {
|
||||
IsUnique bool
|
||||
}
|
||||
|
||||
// MemberMaxSortInp 最大排序
|
||||
type MemberMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type MemberMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// MemberEditInp 修改/新增字典数据
|
||||
type MemberEditInp struct {
|
||||
Id int64 `json:"id" description:""`
|
||||
PostIds []int64 `json:"postIds" v:"required#岗位不能为空" description:"岗位ID"`
|
||||
DeptId int64 `json:"dept_id" v:"required#部门不能为空" description:"部门ID"`
|
||||
Username string `json:"username" v:"required#账号不能为空" description:"帐号"`
|
||||
Password string `json:"password" description:"密码"`
|
||||
Realname string `json:"realname" description:"真实姓名"`
|
||||
Avatar string `json:"avatar" description:"头像"`
|
||||
Sex string `json:"sex" description:"性别[0:未知;1:男;2:女]"`
|
||||
Qq string `json:"qq" description:"qq"`
|
||||
Email string `json:"email" description:"邮箱"`
|
||||
Birthday *gtime.Time `json:"birthday" description:"生日"`
|
||||
ProvinceId int `json:"province_id" description:"省"`
|
||||
CityId int `json:"city_id" description:"城市"`
|
||||
AreaId int `json:"area_id" description:"地区"`
|
||||
Address string `json:"address" description:"默认地址"`
|
||||
Mobile string `json:"mobile" description:"手机号码"`
|
||||
HomePhone string `json:"home_phone" description:"家庭号码"`
|
||||
DingtalkRobotToken string `json:"dingtalk_robot_token" description:"钉钉机器人token"`
|
||||
Role int `json:"role" v:"required#角色不能为空" description:"权限"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Status string `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updated_at" description:"修改时间"`
|
||||
}
|
||||
|
||||
type MemberAddInp struct {
|
||||
MemberEditInp
|
||||
PasswordHash string `json:"password_hash" description:"密码hash"`
|
||||
Salt string `json:"salt" description:"密码盐"`
|
||||
}
|
||||
|
||||
type MemberEditModel struct{}
|
||||
|
||||
// MemberDeleteInp 删除字典类型
|
||||
type MemberDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type MemberDeleteModel struct{}
|
||||
|
||||
// MemberViewInp 获取信息
|
||||
type MemberViewInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type MemberViewModel struct {
|
||||
entity.AdminMember
|
||||
}
|
||||
|
||||
// MemberListInp 获取列表
|
||||
type MemberListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string
|
||||
Code string
|
||||
DeptId int
|
||||
Mobile int
|
||||
Username string
|
||||
Realname string
|
||||
CreatedAt []int64
|
||||
}
|
||||
|
||||
type MemberListModel struct {
|
||||
entity.AdminMember
|
||||
DeptName string `json:"dept_name"`
|
||||
RoleName string `json:"role_name"`
|
||||
PostIds []int64 `json:"postIds"`
|
||||
DeptId int64 `json:"dept_id" description:"部门ID"`
|
||||
}
|
||||
|
||||
// MemberLoginInp 登录
|
||||
type MemberLoginInp struct {
|
||||
Username string
|
||||
Password string
|
||||
}
|
||||
type MemberLoginModel struct {
|
||||
UserId int64 `json:"userId" description:"会员ID"`
|
||||
Username string `json:"username" description:"用户名"`
|
||||
RealName string `json:"realName" description:"昵称"`
|
||||
Avatar string `json:"avatar" description:"头像"`
|
||||
Token string `json:"token" v:"" description:"登录token"`
|
||||
Permissions []MemberLoginPermissions `json:"permissions" description:"角色信息"`
|
||||
}
|
||||
|
||||
// MemberLoginPermissions 登录用户角色信息
|
||||
type MemberLoginPermissions struct {
|
||||
Label string `json:"label" description:"标签"`
|
||||
Value string `json:"value" description:"值"`
|
||||
}
|
||||
|
||||
// MemberStatusInp 更新状态
|
||||
type MemberStatusInp struct {
|
||||
entity.AdminPost
|
||||
}
|
||||
type MemberStatusModel struct{}
|
144
server/internal/model/input/adminin/menu.go
Normal file
144
server/internal/model/input/adminin/menu.go
Normal file
@@ -0,0 +1,144 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// MenuMaxSortReq 菜单最大排序
|
||||
type MenuMaxSortReq struct {
|
||||
g.Meta `path:"/menu/max_sort" method:"get" tags:"菜单" summary:"菜单最大排序"`
|
||||
Id int64 `json:"id" dc:"菜单ID"`
|
||||
}
|
||||
type MenuMaxSortRes struct {
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
// MenuCodeUniqueReq 菜单编码是否唯一
|
||||
type MenuCodeUniqueReq struct {
|
||||
g.Meta `path:"/menu/code_unique" method:"get" tags:"菜单" summary:"菜单编码是否唯一"`
|
||||
Code string `json:"code" v:"required#菜单编码不能为空" dc:"菜单编码"`
|
||||
Id int64 `json:"id" dc:"菜单ID"`
|
||||
}
|
||||
type MenuCodeUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// MenuNameUniqueReq 菜单名称是否唯一
|
||||
type MenuNameUniqueReq struct {
|
||||
g.Meta `path:"/menu/name_unique" method:"get" tags:"菜单" summary:"菜单名称是否唯一"`
|
||||
Name string `json:"name" v:"required#菜单名称不能为空" dc:"菜单名称"`
|
||||
Id int64 `json:"id" dc:"菜单ID"`
|
||||
}
|
||||
type MenuNameUniqueRes struct {
|
||||
IsUnique bool `json:"is_unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
// MenuEditReq 修改/新增菜单
|
||||
type MenuEditReq struct {
|
||||
g.Meta `path:"/menu/edit" method:"post" tags:"菜单" summary:"修改/新增菜单"`
|
||||
entity.AdminMenu
|
||||
}
|
||||
type MenuEditRes struct{}
|
||||
|
||||
// MenuDeleteReq 删除菜单
|
||||
type MenuDeleteReq struct {
|
||||
g.Meta `path:"/menu/delete" method:"post" tags:"菜单" summary:"删除菜单"`
|
||||
Id interface{} `json:"id" v:"required#菜单ID不能为空" dc:"菜单ID"`
|
||||
}
|
||||
type MenuDeleteRes struct{}
|
||||
|
||||
// MenuViewReq 获取指定菜单信息
|
||||
type MenuViewReq struct {
|
||||
g.Meta `path:"/menu/view" method:"get" tags:"菜单" summary:"获取指定菜单信息"`
|
||||
Id string `json:"id" v:"required#菜单ID不能为空" dc:"菜单ID"`
|
||||
}
|
||||
type MenuViewRes struct {
|
||||
*entity.AdminMenu
|
||||
}
|
||||
|
||||
// MenuListReq 获取菜单列表
|
||||
type MenuListReq struct {
|
||||
g.Meta `path:"/menu/list" method:"get" tags:"菜单" summary:"获取菜单列表"`
|
||||
form.PageReq
|
||||
Pid int64 `json:"pid" dc:"父ID"`
|
||||
}
|
||||
|
||||
type MenuListRes struct {
|
||||
List []*entity.AdminMenu `json:"list" dc:"数据列表"`
|
||||
form.PageRes
|
||||
}
|
||||
|
||||
// MenuSearchListReq 查询菜单列表
|
||||
type MenuSearchListReq struct {
|
||||
g.Meta `path:"/menu/search_list" method:"get" tags:"菜单" summary:"获取菜单列表"`
|
||||
Name string `json:"name" dc:"菜单名称"`
|
||||
form.StatusReq
|
||||
}
|
||||
|
||||
type MenuSearchListRes []*model.TreeMenu
|
||||
|
||||
// MenuRoleListReq 查询角色菜单列表
|
||||
type MenuRoleListReq struct {
|
||||
g.Meta `path:"/menu/role_list" method:"get" tags:"菜单" summary:"查询角色菜单列表"`
|
||||
RoleId string `json:"role_id" dc:"角色ID"`
|
||||
}
|
||||
|
||||
type MenuRoleListRes struct {
|
||||
Menus []*model.LabelTreeMenu `json:"menus" dc:"菜单列表"`
|
||||
CheckedKeys []int64 `json:"checkedKeys" dc:"选择的菜单ID"`
|
||||
}
|
||||
|
||||
// MenuTree 菜单树结构
|
||||
type MenuTree struct {
|
||||
// 适配n-tree
|
||||
Id int64 `json:"key" `
|
||||
Title string `json:"label"`
|
||||
entity.AdminMenu
|
||||
}
|
||||
|
||||
// MenuRouteMeta 菜单路由
|
||||
type MenuRouteMeta struct {
|
||||
// 解释参考:https://naive-ui-admin-docs.vercel.app/guide/router.html#%E5%A4%9A%E7%BA%A7%E8%B7%AF%E7%94%B1
|
||||
Title string `json:"title"` // 菜单名称 一般必填
|
||||
//Disabled bool `json:"disabled,omitempty"` // 禁用菜单
|
||||
Icon string `json:"icon,omitempty"` // 菜单图标
|
||||
KeepAlive bool `json:"keepAlive,omitempty"` // 缓存该路由
|
||||
Hidden bool `json:"hidden,omitempty"` // 隐藏菜单
|
||||
Sort int `json:"sort,omitempty"` // 排序越小越排前
|
||||
AlwaysShow bool `json:"alwaysShow,omitempty"` // 取消自动计算根路由模式
|
||||
ActiveMenu string `json:"activeMenu,omitempty"` // 当路由设置了该属性,则会高亮相对应的侧边栏。
|
||||
// 这在某些场景非常有用,比如:一个列表页路由为:/list/basic-list
|
||||
// 点击进入详情页,这时候路由为/list/basic-info/1,但你想在侧边栏高亮列表的路由,就可以进行如下设置
|
||||
// 注意是配置高亮路由 `name`,不是path
|
||||
IsRoot bool `json:"isRoot,omitempty"` // 是否跟路由 顶部混合菜单,必须传 true,否则左侧会显示异常(场景就是,分割菜单之后,当一级菜单没有子菜单)
|
||||
FrameSrc string `json:"frameSrc,omitempty" ` // 内联外部地址
|
||||
Permissions string `json:"permissions,omitempty"` // 菜单包含权限集合,满足其中一个就会显示
|
||||
Affix bool `json:"affix,omitempty"` // 是否固定 设置为 true 之后 多页签不可删除
|
||||
|
||||
// 自定义
|
||||
Type int `json:"type"` // 菜单类型
|
||||
}
|
||||
|
||||
type MenuRoute struct {
|
||||
Name string `json:"name"`
|
||||
Path string `json:"path"`
|
||||
Redirect string `json:"redirect"`
|
||||
Component string `json:"component"`
|
||||
Meta MenuRouteMeta `json:"meta"`
|
||||
Children []MenuRoute `json:"children,omitempty" dc:"子路由"`
|
||||
}
|
||||
|
||||
// MenuRouteSummary 菜单树结构
|
||||
type MenuRouteSummary struct {
|
||||
entity.AdminMenu
|
||||
Children []MenuRouteSummary
|
||||
}
|
64
server/internal/model/input/adminin/notice.go
Normal file
64
server/internal/model/input/adminin/notice.go
Normal file
@@ -0,0 +1,64 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// NoticeMaxSortInp 最大排序
|
||||
type NoticeMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type NoticeMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// NoticeEditInp 修改/新增字典数据
|
||||
type NoticeEditInp struct {
|
||||
entity.AdminNotice
|
||||
Receiver string `json:"receiver" description:"接收者"`
|
||||
Reader string `json:"reader" description:"已读人"`
|
||||
}
|
||||
type NoticeEditModel struct{}
|
||||
|
||||
// NoticeDeleteInp 删除字典类型
|
||||
type NoticeDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type NoticeDeleteModel struct{}
|
||||
|
||||
// NoticeViewInp 获取信息
|
||||
type NoticeViewInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type NoticeViewModel struct {
|
||||
entity.AdminNotice
|
||||
}
|
||||
|
||||
// NoticeListInp 获取列表
|
||||
type NoticeListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Title string
|
||||
Content string
|
||||
}
|
||||
|
||||
type NoticeListModel struct {
|
||||
entity.AdminNotice
|
||||
ReceiveNum int `json:"receiveNum"`
|
||||
}
|
||||
|
||||
// NoticeStatusInp 更新状态
|
||||
type NoticeStatusInp struct {
|
||||
entity.AdminNotice
|
||||
}
|
||||
type NoticeStatusModel struct{}
|
81
server/internal/model/input/adminin/post.go
Normal file
81
server/internal/model/input/adminin/post.go
Normal file
@@ -0,0 +1,81 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// PostListInp 获取列表
|
||||
type PostListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string
|
||||
Code string
|
||||
}
|
||||
|
||||
type PostListModel struct {
|
||||
entity.AdminPost
|
||||
}
|
||||
|
||||
// PostViewInp 获取信息
|
||||
type PostViewInp struct {
|
||||
Id string
|
||||
}
|
||||
|
||||
type PostViewModel struct {
|
||||
entity.AdminPost
|
||||
}
|
||||
|
||||
// PostCodeUniqueInp 编码是否唯一
|
||||
type PostCodeUniqueInp struct {
|
||||
Code string
|
||||
Id int64
|
||||
}
|
||||
|
||||
type PostCodeUniqueModel struct {
|
||||
IsUnique bool
|
||||
}
|
||||
|
||||
// PostNameUniqueInp 名称是否唯一
|
||||
type PostNameUniqueInp struct {
|
||||
Name string
|
||||
Id int64
|
||||
}
|
||||
|
||||
type PostNameUniqueModel struct {
|
||||
IsUnique bool
|
||||
}
|
||||
|
||||
// PostMaxSortInp 最大排序
|
||||
type PostMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type PostMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// PostEditInp 修改/新增字典数据
|
||||
type PostEditInp struct {
|
||||
entity.AdminPost
|
||||
}
|
||||
type PostEditModel struct{}
|
||||
|
||||
// PostDeleteInp 删除字典类型
|
||||
type PostDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type PostDeleteModel struct{}
|
||||
|
||||
// PostStatusInp 更新状态
|
||||
type PostStatusInp struct {
|
||||
entity.AdminPost
|
||||
}
|
||||
type PostStatusModel struct{}
|
50
server/internal/model/input/adminin/role.go
Normal file
50
server/internal/model/input/adminin/role.go
Normal file
@@ -0,0 +1,50 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// RoleListInp 获取列表
|
||||
type RoleListInp struct {
|
||||
Page int
|
||||
PerPage int
|
||||
}
|
||||
|
||||
type RoleListModel struct {
|
||||
entity.AdminRole
|
||||
}
|
||||
|
||||
// RoleMemberListInp 查询列表
|
||||
type RoleMemberListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Role int `json:"role" description:"角色ID"`
|
||||
DeptId int `json:"dept_id" description:"部门ID"`
|
||||
Mobile int `json:"mobile" description:"手机号"`
|
||||
Username string `json:"username" description:"用户名"`
|
||||
Realname string `json:"realname" description:"真实姓名"`
|
||||
StartTime string `json:"start_time" description:"开始时间"`
|
||||
EndTime string `json:"end_time" description:"结束时间"`
|
||||
Name string `json:"name" description:"岗位名称"`
|
||||
Code string `json:"code" description:"岗位编码"`
|
||||
}
|
||||
|
||||
type RoleMemberListModel []*MemberListModel
|
||||
|
||||
// MenuRoleListInp 查询角色菜单列表
|
||||
type MenuRoleListInp struct {
|
||||
RoleId int64
|
||||
}
|
||||
type MenuRoleListModel struct {
|
||||
Menus []*model.LabelTreeMenu `json:"menus" description:"菜单列表"`
|
||||
CheckedKeys []int64 `json:"checkedKeys" description:"选择的菜单ID"`
|
||||
}
|
85
server/internal/model/input/form/base.go
Normal file
85
server/internal/model/input/form/base.go
Normal file
@@ -0,0 +1,85 @@
|
||||
// Package form
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package form
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
var (
|
||||
page int
|
||||
pageSize int
|
||||
)
|
||||
|
||||
// DefaultPageSize 列表分页默认加载页码
|
||||
func DefaultPageSize(ctx context.Context) int {
|
||||
if pageSize > 0 {
|
||||
return pageSize
|
||||
}
|
||||
defaultPageSize, _ := g.Cfg().Get(ctx, "hotgo.admin.defaultPageSize", 10)
|
||||
pageSize = defaultPageSize.Int()
|
||||
if pageSize <= 0 {
|
||||
pageSize = 10
|
||||
}
|
||||
return pageSize
|
||||
}
|
||||
|
||||
// DefaultPage 列表分页默认加载数量
|
||||
func DefaultPage(ctx context.Context) int {
|
||||
if page > 0 {
|
||||
return page
|
||||
}
|
||||
defaultPage, _ := g.Cfg().Get(ctx, "hotgo.admin.defaultPage", 1)
|
||||
page = defaultPage.Int()
|
||||
if page <= 0 {
|
||||
page = 10
|
||||
}
|
||||
return page
|
||||
}
|
||||
|
||||
// PageReq 分页
|
||||
type PageReq struct {
|
||||
Page int `json:"page" example:"10" d:"1" v:"min:1#页码最小值不能低于1" dc:"当前页码"`
|
||||
PerPage int `json:"pageSize" example:"1" d:"10" v:"min:1|max:100#|每页数量最小值不能低于1|最大值不能大于100" dc:"每页数量"`
|
||||
}
|
||||
type PageRes struct {
|
||||
PageReq
|
||||
PageCount int `json:"pageCount" example:"0" dc:"全部数据量"`
|
||||
}
|
||||
|
||||
// RangeDateReq 时间查询
|
||||
type RangeDateReq struct {
|
||||
StartTime string `json:"start_time" v:"date#开始日期格式不正确" dc:"开始日期"`
|
||||
EndTime string `json:"end_time" v:"date#结束日期格式不正确" dc:"结束日期"`
|
||||
}
|
||||
|
||||
// StatusReq 状态查询
|
||||
type StatusReq struct {
|
||||
Status int `json:"status" v:"in:-1,0,1,2,3#输入的状态是无效的" dc:"状态"`
|
||||
}
|
||||
|
||||
// CalPage 解析分页
|
||||
func CalPage(ctx context.Context, page, perPage int) (newPage, newPerPage int, offset int) {
|
||||
if page <= 0 {
|
||||
newPage = DefaultPage(ctx)
|
||||
} else {
|
||||
newPage = page
|
||||
}
|
||||
if perPage <= 0 {
|
||||
newPerPage = DefaultPageSize(ctx)
|
||||
} else {
|
||||
newPerPage = perPage
|
||||
}
|
||||
|
||||
offset = (newPage - 1) * newPerPage
|
||||
return
|
||||
}
|
||||
|
||||
func CalPageCount(totalCount, perPage int) int {
|
||||
return (totalCount + perPage - 1) / perPage
|
||||
}
|
72
server/internal/model/input/sysin/attachment.go
Normal file
72
server/internal/model/input/sysin/attachment.go
Normal file
@@ -0,0 +1,72 @@
|
||||
// Package sysin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// AttachmentMaxSortInp 最大排序
|
||||
type AttachmentMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type AttachmentMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// AttachmentEditInp 修改/新增字典数据
|
||||
type AttachmentEditInp struct {
|
||||
entity.SysAttachment
|
||||
}
|
||||
type AttachmentEditModel struct{}
|
||||
|
||||
// AttachmentDeleteInp 删除字典类型
|
||||
type AttachmentDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type AttachmentDeleteModel struct{}
|
||||
|
||||
// AttachmentViewInp 获取信息
|
||||
type AttachmentViewInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type AttachmentViewModel struct {
|
||||
entity.SysAttachment
|
||||
}
|
||||
|
||||
// AttachmentListInp 获取列表
|
||||
type AttachmentListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
MemberId int64
|
||||
Drive string
|
||||
}
|
||||
|
||||
type AttachmentListModel struct {
|
||||
entity.SysAttachment
|
||||
SizeFormat string `json:"sizeFormat" description:"长度"`
|
||||
}
|
||||
|
||||
// AttachmentStatusInp 更新状态
|
||||
type AttachmentStatusInp struct {
|
||||
entity.SysAttachment
|
||||
}
|
||||
type AttachmentStatusModel struct{}
|
||||
|
||||
type UploadFileMeta struct {
|
||||
Filename string
|
||||
Size int64
|
||||
Kind string
|
||||
MetaType string
|
||||
NaiveType string
|
||||
Ext string
|
||||
Md5 string
|
||||
}
|
60
server/internal/model/input/sysin/blacklist.go
Normal file
60
server/internal/model/input/sysin/blacklist.go
Normal file
@@ -0,0 +1,60 @@
|
||||
// Package sysin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// BlacklistMaxSortInp 最大排序
|
||||
type BlacklistMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type BlacklistMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// BlacklistEditInp 修改/新增字典数据
|
||||
type BlacklistEditInp struct {
|
||||
entity.SysBlacklist
|
||||
}
|
||||
type BlacklistEditModel struct{}
|
||||
|
||||
// BlacklistDeleteInp 删除字典类型
|
||||
type BlacklistDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type BlacklistDeleteModel struct{}
|
||||
|
||||
// BlacklistViewInp 获取信息
|
||||
type BlacklistViewInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type BlacklistViewModel struct {
|
||||
entity.SysBlacklist
|
||||
}
|
||||
|
||||
// BlacklistListInp 获取列表
|
||||
type BlacklistListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Ip string
|
||||
}
|
||||
|
||||
type BlacklistListModel struct {
|
||||
entity.SysBlacklist
|
||||
}
|
||||
|
||||
// BlacklistStatusInp 更新状态
|
||||
type BlacklistStatusInp struct {
|
||||
entity.SysBlacklist
|
||||
}
|
||||
type BlacklistStatusModel struct{}
|
101
server/internal/model/input/sysin/config.go
Normal file
101
server/internal/model/input/sysin/config.go
Normal file
@@ -0,0 +1,101 @@
|
||||
// Package sysin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
type GetConfigItem struct {
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// UpdateConfigInp 更新指定分组的配置
|
||||
type UpdateConfigInp struct {
|
||||
Group string `json:"group"`
|
||||
List g.Map `json:"list"`
|
||||
}
|
||||
|
||||
// GetConfigInp 获取指定分组的配置
|
||||
type GetConfigInp struct {
|
||||
Group string `json:"group"`
|
||||
}
|
||||
type GetConfigModel struct {
|
||||
List g.Map `json:"list"`
|
||||
}
|
||||
|
||||
// ConfigGetValueInp 获取指定配置键的值
|
||||
type ConfigGetValueInp struct {
|
||||
Key string
|
||||
}
|
||||
type ConfigGetValueModel struct {
|
||||
Value string
|
||||
}
|
||||
|
||||
// ConfigNameUniqueInp 名称是否唯一
|
||||
type ConfigNameUniqueInp struct {
|
||||
Name string
|
||||
Id int64
|
||||
}
|
||||
|
||||
type ConfigNameUniqueModel struct {
|
||||
IsUnique bool
|
||||
}
|
||||
|
||||
// ConfigMaxSortInp 最大排序
|
||||
type ConfigMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type ConfigMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// ConfigEditInp 修改/新增字典数据
|
||||
type ConfigEditInp struct {
|
||||
entity.SysConfig
|
||||
}
|
||||
type ConfigEditModel struct{}
|
||||
|
||||
// ConfigDeleteInp 删除字典类型
|
||||
type ConfigDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type ConfigDeleteModel struct{}
|
||||
|
||||
// ConfigViewInp 获取信息
|
||||
type ConfigViewInp struct {
|
||||
Id string
|
||||
}
|
||||
|
||||
type ConfigViewModel struct {
|
||||
entity.SysConfig
|
||||
}
|
||||
|
||||
// ConfigListInp 获取列表
|
||||
type ConfigListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string
|
||||
Code string
|
||||
DeptId int
|
||||
Mobile int
|
||||
Username string
|
||||
Realname string
|
||||
StartTime string
|
||||
EndTime string
|
||||
}
|
||||
|
||||
type ConfigListModel struct {
|
||||
entity.SysConfig
|
||||
DeptName string `json:"dept_name"`
|
||||
RoleName string `json:"role_name"`
|
||||
}
|
61
server/internal/model/input/sysin/cron.go
Normal file
61
server/internal/model/input/sysin/cron.go
Normal file
@@ -0,0 +1,61 @@
|
||||
// Package sysin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// CronMaxSortInp 最大排序
|
||||
type CronMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type CronMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// CronEditInp 修改/新增字典数据
|
||||
type CronEditInp struct {
|
||||
entity.SysCron
|
||||
}
|
||||
type CronEditModel struct{}
|
||||
|
||||
// CronDeleteInp 删除字典类型
|
||||
type CronDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type CronDeleteModel struct{}
|
||||
|
||||
// CronViewInp 获取信息
|
||||
type CronViewInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type CronViewModel struct {
|
||||
entity.SysCron
|
||||
}
|
||||
|
||||
// CronListInp 获取列表
|
||||
type CronListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string
|
||||
}
|
||||
|
||||
type CronListModel struct {
|
||||
entity.SysCron
|
||||
GroupName string `json:"groupName"`
|
||||
}
|
||||
|
||||
// CronStatusInp 更新状态
|
||||
type CronStatusInp struct {
|
||||
entity.SysCron
|
||||
}
|
||||
type CronStatusModel struct{}
|
67
server/internal/model/input/sysin/cron_group.go
Normal file
67
server/internal/model/input/sysin/cron_group.go
Normal file
@@ -0,0 +1,67 @@
|
||||
// Package sysin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// CronGroupMaxSortInp 最大排序
|
||||
type CronGroupMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type CronGroupMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// CronGroupEditInp 修改/新增字典数据
|
||||
type CronGroupEditInp struct {
|
||||
entity.SysCronGroup
|
||||
}
|
||||
type CronGroupEditModel struct{}
|
||||
|
||||
// CronGroupDeleteInp 删除字典类型
|
||||
type CronGroupDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type CronGroupDeleteModel struct{}
|
||||
|
||||
// CronGroupViewInp 获取信息
|
||||
type CronGroupViewInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type CronGroupViewModel struct {
|
||||
entity.SysCronGroup
|
||||
}
|
||||
|
||||
// CronGroupListInp 获取列表
|
||||
type CronGroupListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string
|
||||
}
|
||||
|
||||
type CronGroupListModel struct {
|
||||
entity.SysCronGroup
|
||||
}
|
||||
|
||||
// CronGroupStatusInp 更新状态
|
||||
type CronGroupStatusInp struct {
|
||||
entity.SysCronGroup
|
||||
}
|
||||
type CronGroupStatusModel struct{}
|
||||
|
||||
// CronGroupSelectInp 选项
|
||||
type CronGroupSelectInp struct {
|
||||
}
|
||||
|
||||
type CronGroupSelectModel []g.Map
|
40
server/internal/model/input/sysin/dict_data.go
Normal file
40
server/internal/model/input/sysin/dict_data.go
Normal file
@@ -0,0 +1,40 @@
|
||||
// Package sysin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// DictDataEditInp 修改/新增字典数据
|
||||
type DictDataEditInp struct {
|
||||
entity.SysDictData
|
||||
TypeID int64
|
||||
}
|
||||
type DictDataEditModel struct{}
|
||||
|
||||
// DictDataDeleteInp 删除字典数据
|
||||
type DictDataDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type DictDataDeleteModel struct{}
|
||||
|
||||
// DictDataListInp 获取列表
|
||||
type DictDataListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
TypeID int64
|
||||
Type string
|
||||
Label string
|
||||
}
|
||||
|
||||
type DictDataListModel struct {
|
||||
TypeID int64 `json:"typeId"`
|
||||
entity.SysDictData
|
||||
}
|
30
server/internal/model/input/sysin/dict_type.go
Normal file
30
server/internal/model/input/sysin/dict_type.go
Normal file
@@ -0,0 +1,30 @@
|
||||
// Package sysin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/model/entity"
|
||||
)
|
||||
|
||||
// DictTypeEditInp 修改/新增字典数据
|
||||
type DictTypeEditInp struct {
|
||||
entity.SysDictType
|
||||
}
|
||||
type DictTypeEditModel struct{}
|
||||
|
||||
// DictTypeDeleteInp 删除字典类型
|
||||
type DictTypeDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type DictTypeDeleteModel struct{}
|
||||
|
||||
// DictTypeSelectInp 获取类型选项
|
||||
type DictTypeSelectInp struct {
|
||||
}
|
||||
|
||||
type DictTypeSelectModel []g.Map
|
50
server/internal/model/input/sysin/log.go
Normal file
50
server/internal/model/input/sysin/log.go
Normal file
@@ -0,0 +1,50 @@
|
||||
// Package sysin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// LogListInp 获取菜单列表
|
||||
type LogListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Module string
|
||||
MemberId int
|
||||
TakeUpTime int
|
||||
Method string
|
||||
Url string
|
||||
Ip string
|
||||
ErrorCode string
|
||||
StartTime string
|
||||
EndTime string
|
||||
CreatedAt []int64
|
||||
}
|
||||
|
||||
type LogListModel struct {
|
||||
entity.SysLog
|
||||
MemberName string `json:"member_name"`
|
||||
Region string `json:"region"`
|
||||
}
|
||||
|
||||
// LogViewInp 获取信息
|
||||
type LogViewInp struct {
|
||||
Id string
|
||||
}
|
||||
|
||||
type LogViewModel struct {
|
||||
entity.SysLog
|
||||
}
|
||||
|
||||
// LogDeleteInp 删除
|
||||
type LogDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type LogDeleteModel struct{}
|
61
server/internal/model/input/sysin/provinces.go
Normal file
61
server/internal/model/input/sysin/provinces.go
Normal file
@@ -0,0 +1,61 @@
|
||||
// Package sysin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// ProvincesMaxSortInp 最大排序
|
||||
type ProvincesMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type ProvincesMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// ProvincesEditInp 修改/新增字典数据
|
||||
type ProvincesEditInp struct {
|
||||
entity.SysProvinces
|
||||
}
|
||||
type ProvincesEditModel struct{}
|
||||
|
||||
// ProvincesDeleteInp 删除字典类型
|
||||
type ProvincesDeleteInp struct {
|
||||
Id interface{}
|
||||
}
|
||||
type ProvincesDeleteModel struct{}
|
||||
|
||||
// ProvincesViewInp 获取信息
|
||||
type ProvincesViewInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type ProvincesViewModel struct {
|
||||
entity.SysProvinces
|
||||
}
|
||||
|
||||
// ProvincesListInp 获取列表
|
||||
type ProvincesListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Title string
|
||||
Content string
|
||||
}
|
||||
|
||||
type ProvincesListModel struct {
|
||||
entity.SysProvinces
|
||||
}
|
||||
|
||||
// ProvincesStatusInp 更新状态
|
||||
type ProvincesStatusInp struct {
|
||||
entity.SysProvinces
|
||||
}
|
||||
type ProvincesStatusModel struct{}
|
22
server/internal/model/input/websocketin/send.go
Normal file
22
server/internal/model/input/websocketin/send.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Package websocketin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package websocketin
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/internal/websocket"
|
||||
)
|
||||
|
||||
// SendToTagReq 发送标签消息
|
||||
type SendToTagReq struct {
|
||||
g.Meta `path:"/send/toTag" method:"post" tags:"WebSocket" summary:"发送标签消息"`
|
||||
Tag string `json:"tag" v:"required#tag不能为空" description:"标签"`
|
||||
Response websocket.WResponse `json:"response" v:"required#response不能为空" description:"响应内容"`
|
||||
}
|
||||
|
||||
type SendToTagRes struct {
|
||||
}
|
38
server/internal/model/monitor.go
Normal file
38
server/internal/model/monitor.go
Normal file
@@ -0,0 +1,38 @@
|
||||
// Package model
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
type MonitorData struct {
|
||||
// STartTime 启动时间
|
||||
STartTime *gtime.Time
|
||||
// 内网IP
|
||||
IntranetIP string
|
||||
// 公网IP
|
||||
PublicIP string
|
||||
// NetIO 网络流量统计
|
||||
NetIO []*NetIOCounters
|
||||
// LoadAvg 负载统计
|
||||
LoadAvg []*LoadAvgStats
|
||||
}
|
||||
|
||||
type NetIOCounters struct {
|
||||
Time *gtime.Time `json:"time"`
|
||||
BytesSent uint64 `json:"bytesSent"` // number of bytes sent
|
||||
BytesRecv uint64 `json:"bytesRecv"` // number of bytes received
|
||||
Down float64 `json:"down"`
|
||||
UP float64 `json:"up"`
|
||||
}
|
||||
|
||||
type LoadAvgStats struct {
|
||||
Time *gtime.Time `json:"time"`
|
||||
Avg float64 `json:"avg"`
|
||||
Ratio float64 `json:"ratio"`
|
||||
}
|
17
server/internal/model/response.go
Normal file
17
server/internal/model/response.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// Package model
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package model
|
||||
|
||||
// Response HTTP响应
|
||||
type Response struct {
|
||||
Code int `json:"code" example:"0" description:"状态码"`
|
||||
Message string `json:"message,omitempty" example:"操作成功" description:"提示消息"`
|
||||
Data interface{} `json:"data,omitempty" description:"数据集"`
|
||||
Error interface{} `json:"error,omitempty" description:"错误信息"`
|
||||
Timestamp int64 `json:"timestamp" example:"1640966400" description:"服务器时间戳"`
|
||||
TraceID string `json:"traceID" v:"0" example:"d0bb93048bc5c9164cdee845dcb7f820" description:"链路ID"`
|
||||
}
|
23
server/internal/model/tree.go
Normal file
23
server/internal/model/tree.go
Normal file
@@ -0,0 +1,23 @@
|
||||
// Package model
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package model
|
||||
|
||||
import "hotgo/internal/model/entity"
|
||||
|
||||
// TreeMenu 菜单树
|
||||
type TreeMenu struct {
|
||||
entity.AdminMenu
|
||||
Children []*TreeMenu `json:"children"`
|
||||
}
|
||||
|
||||
// LabelTreeMenu 菜单kv树
|
||||
type LabelTreeMenu struct {
|
||||
entity.AdminMenu
|
||||
Key int64 `json:"key" description:"键名"`
|
||||
Label string `json:"label" description:"键标签"`
|
||||
Children []*LabelTreeMenu `json:"children"`
|
||||
}
|
Reference in New Issue
Block a user