mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-12 12:13:51 +08:00
发布v2.8.4版本,更新内容请查看:https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN/addon-version-upgrade.md
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
@@ -16,7 +16,7 @@ type AdminPost struct {
|
||||
Code interface{} // 岗位编码
|
||||
Name interface{} // 岗位名称
|
||||
Remark interface{} // 备注
|
||||
Sort interface{} // 显示顺序
|
||||
Sort interface{} // 排序
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
@@ -19,7 +19,7 @@ type SysAttachment struct {
|
||||
Drive interface{} // 上传驱动
|
||||
Name interface{} // 文件原始名
|
||||
Kind interface{} // 上传类型
|
||||
MetaType interface{} // 文件类型
|
||||
MimeType interface{} // 扩展类型
|
||||
NaiveType interface{} // NaiveUI类型
|
||||
Path interface{} // 本地路径
|
||||
FileUrl interface{} // url
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
@@ -18,16 +18,14 @@ type SysServeLicense struct {
|
||||
Name interface{} // 许可名称
|
||||
Appid interface{} // 应用ID
|
||||
SecretKey interface{} // 应用秘钥
|
||||
Desc interface{} // 授权说明
|
||||
RemoteAddr interface{} // 最后连接地址
|
||||
Online interface{} // 在线数量
|
||||
OnlineLimit interface{} // 在线数量限制,默认1
|
||||
OnlineLimit interface{} // 在线限制
|
||||
LoginTimes interface{} // 登录次数
|
||||
LastLoginAt *gtime.Time // 最后登录时间
|
||||
LastActiveAt *gtime.Time // 最后活跃时间
|
||||
LastActiveAt *gtime.Time // 最后心跳
|
||||
Routes *gjson.Json // 路由表,空使用默认分组路由
|
||||
AllowedIps interface{} // 白名单,*代表所有,只有允许的IP才能连接到tcp服务
|
||||
EndAt *gtime.Time // 授权结束时间
|
||||
AllowedIps interface{} // IP白名单
|
||||
EndAt *gtime.Time // 授权有效期
|
||||
Remark interface{} // 备注
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
@@ -14,7 +14,7 @@ type AdminPost struct {
|
||||
Code string `json:"code" description:"岗位编码"`
|
||||
Name string `json:"name" description:"岗位名称"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Sort int `json:"sort" description:"显示顺序"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
@@ -17,7 +17,7 @@ type SysAttachment struct {
|
||||
Drive string `json:"drive" description:"上传驱动"`
|
||||
Name string `json:"name" description:"文件原始名"`
|
||||
Kind string `json:"kind" description:"上传类型"`
|
||||
MetaType string `json:"metaType" description:"文件类型"`
|
||||
MimeType string `json:"mimeType" description:"扩展类型"`
|
||||
NaiveType string `json:"naiveType" description:"NaiveUI类型"`
|
||||
Path string `json:"path" description:"本地路径"`
|
||||
FileUrl string `json:"fileUrl" description:"url"`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
@@ -16,16 +16,14 @@ type SysServeLicense struct {
|
||||
Name string `json:"name" description:"许可名称"`
|
||||
Appid string `json:"appid" description:"应用ID"`
|
||||
SecretKey string `json:"secretKey" description:"应用秘钥"`
|
||||
Desc string `json:"desc" description:"授权说明"`
|
||||
RemoteAddr string `json:"remoteAddr" description:"最后连接地址"`
|
||||
Online int `json:"online" description:"在线数量"`
|
||||
OnlineLimit int `json:"onlineLimit" description:"在线数量限制,默认1"`
|
||||
OnlineLimit int `json:"onlineLimit" description:"在线限制"`
|
||||
LoginTimes int64 `json:"loginTimes" description:"登录次数"`
|
||||
LastLoginAt *gtime.Time `json:"lastLoginAt" description:"最后登录时间"`
|
||||
LastActiveAt *gtime.Time `json:"lastActiveAt" description:"最后活跃时间"`
|
||||
LastActiveAt *gtime.Time `json:"lastActiveAt" description:"最后心跳"`
|
||||
Routes *gjson.Json `json:"routes" description:"路由表,空使用默认分组路由"`
|
||||
AllowedIps string `json:"allowedIps" description:"白名单,*代表所有,只有允许的IP才能连接到tcp服务"`
|
||||
EndAt *gtime.Time `json:"endAt" description:"授权结束时间"`
|
||||
AllowedIps string `json:"allowedIps" description:"IP白名单"`
|
||||
EndAt *gtime.Time `json:"endAt" description:"授权有效期"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Status int `json:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// =================================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
@@ -23,7 +23,6 @@ type CashViewModel struct {
|
||||
// CashListInp 获取列表
|
||||
type CashListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
MemberId int64 `json:"memberId"`
|
||||
CreatedAt []int64 `json:"created_at"`
|
||||
|
||||
@@ -23,10 +23,10 @@ import (
|
||||
type CreditsLogSaveBalanceInp struct {
|
||||
MemberId int64 `json:"memberId" dc:"管理员ID"`
|
||||
AppId string `json:"appId" dc:"应用id"`
|
||||
AddonsName string `json:"addonsName" description:"插件名称"`
|
||||
AddonsName string `json:"addonsName" dc:"插件名称"`
|
||||
CreditGroup string `json:"creditGroup" dc:"变动的组别"`
|
||||
Num float64 `json:"num" dc:"变动数据"`
|
||||
Ip string `json:"ip" description:"操作人IP"`
|
||||
Ip string `json:"ip" dc:"操作人IP"`
|
||||
MapId int64 `json:"mapId" dc:"关联ID"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
}
|
||||
@@ -51,7 +51,6 @@ func (in *CreditsLogSaveBalanceInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Ip == "" {
|
||||
in.Ip = location.GetClientIp(ghttp.RequestFromCtx(ctx))
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -62,10 +61,10 @@ type CreditsLogSaveBalanceModel struct {
|
||||
type CreditsLogSaveIntegralInp struct {
|
||||
MemberId int64 `json:"memberId" dc:"管理员ID"`
|
||||
AppId string `json:"appId" dc:"应用id"`
|
||||
AddonsName string `json:"addonsName" description:"插件名称"`
|
||||
AddonsName string `json:"addonsName" dc:"插件名称"`
|
||||
CreditGroup string `json:"creditGroup" dc:"变动的组别"`
|
||||
Num float64 `json:"num" dc:"变动数据"`
|
||||
Ip string `json:"ip" description:"操作人IP"`
|
||||
Ip string `json:"ip" dc:"操作人IP"`
|
||||
MapId int64 `json:"mapId" dc:"关联ID"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
}
|
||||
@@ -90,7 +89,6 @@ func (in *CreditsLogSaveIntegralInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Ip == "" {
|
||||
in.Ip = location.GetClientIp(ghttp.RequestFromCtx(ctx))
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ package adminin
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
@@ -16,7 +17,7 @@ import (
|
||||
|
||||
// DeptMaxSortInp 最大排序
|
||||
type DeptMaxSortInp struct {
|
||||
Id int64
|
||||
Id int64 `json:"id" dc:"部门ID"`
|
||||
}
|
||||
|
||||
type DeptMaxSortModel struct {
|
||||
@@ -77,13 +78,13 @@ type DeptInsertFields struct {
|
||||
|
||||
// DeptDeleteInp 删除部门类型
|
||||
type DeptDeleteInp struct {
|
||||
Id interface{}
|
||||
Id interface{} `json:"id" v:"required#部门ID不能为空" dc:"部门ID"`
|
||||
}
|
||||
type DeptDeleteModel struct{}
|
||||
|
||||
// DeptViewInp 获取信息
|
||||
type DeptViewInp struct {
|
||||
Id int64
|
||||
Id int64 `json:"id" v:"required#部门ID不能为空" dc:"部门ID"`
|
||||
}
|
||||
|
||||
type DeptViewModel struct {
|
||||
@@ -92,8 +93,14 @@ type DeptViewModel struct {
|
||||
|
||||
// DeptListInp 获取列表
|
||||
type DeptListInp struct {
|
||||
Name string
|
||||
Code string
|
||||
Name string `json:"name" dc:"部门名称"`
|
||||
Code string `json:"code" dc:"部门编码"`
|
||||
Leader string `json:"leader" dc:"负责人"`
|
||||
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
}
|
||||
|
||||
func (in *DeptListInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// DeptTree 树
|
||||
|
||||
@@ -72,7 +72,7 @@ type MemberUpdateProfileInp struct {
|
||||
|
||||
// MemberUpdatePwdInp 修改登录密码
|
||||
type MemberUpdatePwdInp struct {
|
||||
Id int64
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
OldPassword string `json:"oldPassword" v:"required#原密码不能为空" dc:"原密码"`
|
||||
NewPassword string `json:"newPassword" v:"required|length:6,16#新密码不能为空#新密码需在6~16之间" dc:"新密码"`
|
||||
}
|
||||
@@ -134,7 +134,7 @@ type MemberEditInp struct {
|
||||
}
|
||||
|
||||
type MemberAddInp struct {
|
||||
MemberEditInp
|
||||
*MemberEditInp
|
||||
Salt string `json:"salt" dc:"密码盐"`
|
||||
Pid int64 `json:"pid" dc:"上级ID"`
|
||||
Level int `json:"level" dc:"等级"`
|
||||
@@ -182,7 +182,6 @@ type MemberViewModel struct {
|
||||
// MemberListInp 获取列表
|
||||
type MemberListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
RoleId int `json:"roleId" dc:"角色ID"`
|
||||
DeptId int `json:"deptId" dc:"部门ID"`
|
||||
@@ -250,13 +249,13 @@ type MemberAddBalanceInp struct {
|
||||
Id int64 `json:"id" v:"required#用户ID不能为空" dc:"管理员ID"`
|
||||
OperateMode int64 `json:"operateMode" v:"in:1,2#输入的操作方式是无效的" dc:"操作方式"`
|
||||
Num float64 `json:"num" dc:"操作数量"`
|
||||
AppId string `json:"-"`
|
||||
AddonsName string `json:"-"`
|
||||
SelfNum float64 `json:"-"`
|
||||
SelfCreditGroup string `json:"-"`
|
||||
OtherNum float64 `json:"-"`
|
||||
OtherCreditGroup string `json:"-"`
|
||||
Remark string `json:"-"`
|
||||
AppId string `json:"appId"`
|
||||
AddonsName string `json:"addonsName"`
|
||||
SelfNum float64 `json:"selfNum"`
|
||||
SelfCreditGroup string `json:"selfCreditGroup"`
|
||||
OtherNum float64 `json:"otherNum"`
|
||||
OtherCreditGroup string `json:"otherCreditGroup"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
func (in *MemberAddBalanceInp) Filter(ctx context.Context) (err error) {
|
||||
@@ -293,13 +292,13 @@ type MemberAddIntegralInp struct {
|
||||
Id int64 `json:"id" v:"required#用户ID不能为空" dc:"管理员ID"`
|
||||
OperateMode int64 `json:"operateMode" dc:"操作方式"`
|
||||
Num float64 `json:"num" dc:"操作数量"`
|
||||
AppId string `json:"-"`
|
||||
AddonsName string `json:"-"`
|
||||
SelfNum float64 `json:"-"`
|
||||
SelfCreditGroup string `json:"-"`
|
||||
OtherNum float64 `json:"-"`
|
||||
OtherCreditGroup string `json:"-"`
|
||||
Remark string `json:"-"`
|
||||
AppId string `json:"appId"`
|
||||
AddonsName string `json:"addonsName"`
|
||||
SelfNum float64 `json:"selfNum"`
|
||||
SelfCreditGroup string `json:"selfCreditGroup"`
|
||||
OtherNum float64 `json:"otherNum"`
|
||||
OtherCreditGroup string `json:"otherCreditGroup"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
func (in *MemberAddIntegralInp) Filter(ctx context.Context) (err error) {
|
||||
|
||||
@@ -103,16 +103,45 @@ type MenuRouteMeta struct {
|
||||
}
|
||||
|
||||
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:"子路由"`
|
||||
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
|
||||
Children []*MenuRouteSummary
|
||||
}
|
||||
|
||||
// DynamicMeta 动态路由元数据
|
||||
type DynamicMeta struct {
|
||||
Title string `json:"title" description:"菜单标题"`
|
||||
Icon string `json:"icon" description:"菜单图标"`
|
||||
NoCache bool `json:"noCache" description:"是否缓存"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
}
|
||||
|
||||
// DynamicBase 动态路由
|
||||
type DynamicBase struct {
|
||||
Id int64 `json:"id" description:"菜单ID"`
|
||||
Pid int64 `json:"pid" description:"父ID"`
|
||||
Name string `json:"name" description:"菜单名称"`
|
||||
Code string `json:"code" description:"菜单编码"`
|
||||
Path string `json:"path" description:"路由地址"`
|
||||
Hidden bool `json:"hidden" description:"是否隐藏"`
|
||||
Redirect string `json:"redirect" description:"重定向"`
|
||||
Component string `json:"component" description:"组件路径"`
|
||||
AlwaysShow bool `json:"alwaysShow" description:"暂时不知道干啥"`
|
||||
IsFrame string `json:"isFrame" description:"是否为外链(0是 1否)"`
|
||||
Meta *DynamicMeta `json:"meta" description:"配置数据集"`
|
||||
}
|
||||
|
||||
// DynamicMenu 动态路由菜单
|
||||
type DynamicMenu struct {
|
||||
DynamicBase
|
||||
Children []*DynamicBase `json:"children" description:"子菜单"`
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
@@ -47,7 +47,6 @@ type NoticeViewModel struct {
|
||||
// NoticeListInp 获取列表
|
||||
type NoticeListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Title string
|
||||
Content string
|
||||
@@ -81,6 +80,13 @@ type PullMessagesInp struct {
|
||||
Limit int `json:"limit" dc:"拉取最大数量限制"`
|
||||
}
|
||||
|
||||
func (in *PullMessagesInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Limit == 0 {
|
||||
in.Limit = 100
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type PullMessagesRow struct {
|
||||
Id int64 `json:"id" dc:"消息ID"`
|
||||
Type int64 `json:"type" dc:"消息类型"`
|
||||
|
||||
@@ -3,21 +3,29 @@
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
"hotgo/utility/validate"
|
||||
)
|
||||
|
||||
// PostListInp 获取列表
|
||||
type PostListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string
|
||||
Code string
|
||||
Name string `json:"name" dc:"岗位名称"`
|
||||
Code string `json:"code" dc:"岗位编码"`
|
||||
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
}
|
||||
|
||||
func (in *PostListInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type PostListModel struct {
|
||||
@@ -26,56 +34,69 @@ type PostListModel struct {
|
||||
|
||||
// PostViewInp 获取信息
|
||||
type PostViewInp struct {
|
||||
Id string
|
||||
Id string `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"`
|
||||
}
|
||||
|
||||
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
|
||||
Id int64 `json:"id" description:"岗位ID"`
|
||||
}
|
||||
|
||||
type PostMaxSortModel struct {
|
||||
Sort int
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
}
|
||||
|
||||
// PostEditInp 修改/新增字典数据
|
||||
type PostEditInp struct {
|
||||
entity.AdminPost
|
||||
}
|
||||
|
||||
func (in *PostEditInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Name == "" {
|
||||
err = gerror.New("名称不能为空")
|
||||
return
|
||||
}
|
||||
if in.Code == "" {
|
||||
err = gerror.New("编码不能为空")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type PostEditModel struct{}
|
||||
|
||||
// PostDeleteInp 删除字典类型
|
||||
type PostDeleteInp struct {
|
||||
Id interface{}
|
||||
Id interface{} `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"`
|
||||
}
|
||||
|
||||
type PostDeleteModel struct{}
|
||||
|
||||
// PostStatusInp 更新状态
|
||||
type PostStatusInp struct {
|
||||
entity.AdminPost
|
||||
}
|
||||
|
||||
func (in *PostStatusInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Id <= 0 {
|
||||
err = gerror.New("ID不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
if in.Status <= 0 {
|
||||
err = gerror.New("状态不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
if !validate.InSlice(consts.StatusSlice, in.Status) {
|
||||
err = gerror.New("状态不正确")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type PostStatusModel struct{}
|
||||
|
||||
@@ -115,7 +115,7 @@ type RoleListModel struct {
|
||||
// RoleMemberListInp 查询列表
|
||||
type RoleMemberListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
|
||||
form.StatusReq
|
||||
Role int `json:"role" dc:"角色ID"`
|
||||
DeptId int `json:"deptId" dc:"部门ID"`
|
||||
|
||||
@@ -5,60 +5,11 @@
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package form
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
)
|
||||
|
||||
var (
|
||||
page int
|
||||
pageSize int
|
||||
)
|
||||
|
||||
// DefaultPageSize 列表分页默认加载页码
|
||||
func DefaultPageSize(ctx context.Context) int {
|
||||
if pageSize > 0 {
|
||||
return pageSize
|
||||
}
|
||||
pageSize = g.Cfg().MustGet(ctx, "hotgo.admin.defaultPageSize", 10).Int()
|
||||
if pageSize <= 0 {
|
||||
pageSize = 10
|
||||
}
|
||||
return pageSize
|
||||
}
|
||||
|
||||
// DefaultPage 列表分页默认加载数量
|
||||
func DefaultPage(ctx context.Context) int {
|
||||
if page > 0 {
|
||||
return page
|
||||
}
|
||||
page = g.Cfg().MustGet(ctx, "hotgo.admin.defaultPage", 1).Int()
|
||||
if page <= 0 {
|
||||
page = 1
|
||||
}
|
||||
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:200#每页数量最小值不能低于1|最大值不能大于200" 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:"结束日期"`
|
||||
}
|
||||
import "hotgo/internal/consts"
|
||||
|
||||
// StatusReq 通用状态查询
|
||||
type StatusReq struct {
|
||||
Status int `json:"status" v:"in:-1,0,1,2,3#输入的状态是无效的" dc:"状态"`
|
||||
Status int `json:"status" v:"in:-1,0,1,2,3#输入的状态是无效的" dc:"状态"`
|
||||
}
|
||||
|
||||
// SwitchReq 更新开关状态
|
||||
@@ -67,62 +18,13 @@ type SwitchReq struct {
|
||||
Value int `json:"value" v:"in:1,2#输入的开关值是无效的" 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 int, perPage int) int {
|
||||
return (totalCount + perPage - 1) / perPage
|
||||
}
|
||||
|
||||
// Selects 选项
|
||||
type Selects []*Select
|
||||
|
||||
type Select struct {
|
||||
Value interface{} `json:"value"`
|
||||
Label string `json:"label"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (p Selects) Len() int {
|
||||
return len(p)
|
||||
}
|
||||
|
||||
func (p Selects) Swap(i, j int) {
|
||||
p[i], p[j] = p[j], p[i]
|
||||
}
|
||||
|
||||
func (p Selects) Less(i, j int) bool {
|
||||
return gconv.Int64(p[j].Value) > gconv.Int64(p[i].Value)
|
||||
}
|
||||
|
||||
type SelectInt64s []*SelectInt64
|
||||
type SelectInt64 struct {
|
||||
Value int64 `json:"value"`
|
||||
Label string `json:"label"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// DefaultMaxSort 默认最大排序
|
||||
func DefaultMaxSort(ctx context.Context, baseSort int) int {
|
||||
return baseSort + g.Cfg().MustGet(ctx, "hotgo.admin.maxSortIncrement", 10).Int()
|
||||
}
|
||||
|
||||
// AvatarGroup 头像组
|
||||
type AvatarGroup struct {
|
||||
Name string `json:"name" dc:"姓名"`
|
||||
Src string `json:"src" dc:"头像地址"`
|
||||
}
|
||||
|
||||
// DefaultMaxSort 默认最大排序
|
||||
func DefaultMaxSort(baseSort int) int {
|
||||
return baseSort + consts.MaxSortIncr
|
||||
}
|
||||
|
||||
60
server/internal/model/input/form/page.go
Normal file
60
server/internal/model/input/form/page.go
Normal file
@@ -0,0 +1,60 @@
|
||||
package form
|
||||
|
||||
import (
|
||||
"hotgo/internal/consts"
|
||||
)
|
||||
|
||||
type ReqPageFunc interface {
|
||||
GetPage() int
|
||||
GetPerPage() int
|
||||
}
|
||||
|
||||
// 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:200#每页数量最小值不能低于1|最大值不能大于200" dc:"每页数量"`
|
||||
}
|
||||
|
||||
// GetPage 获取当前页码
|
||||
func (req *PageReq) GetPage() int {
|
||||
return req.Page
|
||||
}
|
||||
|
||||
// GetPerPage 获取每页数量
|
||||
func (req *PageReq) GetPerPage() int {
|
||||
return req.PerPage
|
||||
}
|
||||
|
||||
// PageRes 分页响应
|
||||
type PageRes struct {
|
||||
PageReq
|
||||
PageCount int `json:"pageCount" example:"0" dc:"全部数据量"`
|
||||
}
|
||||
|
||||
// Pack 打包分页数据
|
||||
func (res *PageRes) Pack(req ReqPageFunc, totalCount int) {
|
||||
res.PageCount = CalPageCount(totalCount, req.GetPerPage())
|
||||
res.Page = req.GetPage()
|
||||
res.PerPage = req.GetPerPage()
|
||||
}
|
||||
|
||||
func CalPageCount(totalCount int, perPage int) int {
|
||||
return (totalCount + perPage - 1) / perPage
|
||||
}
|
||||
|
||||
// CalPage 计算分页偏移量
|
||||
func CalPage(page, perPage int) (newPage, newPerPage int, offset int) {
|
||||
if page <= 0 {
|
||||
newPage = consts.DefaultPage
|
||||
} else {
|
||||
newPage = page
|
||||
}
|
||||
if perPage <= 0 {
|
||||
newPerPage = consts.DefaultPageSize
|
||||
} else {
|
||||
newPerPage = perPage
|
||||
}
|
||||
|
||||
offset = (newPage - 1) * newPerPage
|
||||
return
|
||||
}
|
||||
25
server/internal/model/input/form/select.go
Normal file
25
server/internal/model/input/form/select.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package form
|
||||
|
||||
import "github.com/gogf/gf/v2/util/gconv"
|
||||
|
||||
// Selects 选项
|
||||
type Selects []*Select
|
||||
|
||||
type Select struct {
|
||||
Value interface{} `json:"value"`
|
||||
Label string `json:"label"`
|
||||
Name string `json:"name"`
|
||||
Disabled bool `json:"disabled"`
|
||||
}
|
||||
|
||||
func (p Selects) Len() int {
|
||||
return len(p)
|
||||
}
|
||||
|
||||
func (p Selects) Swap(i, j int) {
|
||||
p[i], p[j] = p[j], p[i]
|
||||
}
|
||||
|
||||
func (p Selects) Less(i, j int) bool {
|
||||
return gconv.Int64(p[j].Value) > gconv.Int64(p[i].Value)
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package msgin
|
||||
|
||||
import "github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
// AuthSummary 授权摘要
|
||||
type AuthSummary struct {
|
||||
RpcMsg
|
||||
}
|
||||
|
||||
// ResponseAuthSummary 响应授权摘要
|
||||
type ResponseAuthSummary struct {
|
||||
Response
|
||||
Data *AuthSummaryData `json:"data,omitempty" description:"数据集"`
|
||||
}
|
||||
|
||||
type AuthSummaryData struct {
|
||||
EndAt *gtime.Time `json:"end_at" description:"授权过期时间"`
|
||||
Online int `json:"online" description:"在线人数"`
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
package msgin
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/utility/encrypt"
|
||||
)
|
||||
|
||||
type RpcMsg struct {
|
||||
AppId string `json:"appID" v:"0" example:"10001" description:"应用ID"`
|
||||
TraceID string `json:"traceID" v:"0" example:"d0bb93048bc5c9164cdee845dcb7f820" description:"链路ID"`
|
||||
Timestamp int64 `json:"timestamp" example:"1640966400" description:"服务器时间戳"`
|
||||
Sign string `json:"sign" example:"d0bb93048bc5c9164cdee845dcb7f820" description:"签名"`
|
||||
}
|
||||
|
||||
func (i *RpcMsg) SetSign(appId, secretKey string) *RpcMsg {
|
||||
i.AppId = appId
|
||||
i.Timestamp = gtime.Timestamp()
|
||||
i.Sign = i.GetSign(secretKey)
|
||||
return i
|
||||
}
|
||||
|
||||
func (i *RpcMsg) GetSign(secretKey string) string {
|
||||
return encrypt.Md5ToString(fmt.Sprintf("%v%v%v%v", i.AppId, i.TraceID, i.Timestamp, secretKey))
|
||||
}
|
||||
|
||||
func (i *RpcMsg) GetTraceID() string {
|
||||
return i.TraceID
|
||||
}
|
||||
|
||||
func (i *RpcMsg) SetTraceID(traceID string) {
|
||||
i.TraceID = traceID
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
RpcMsg
|
||||
Code int `json:"code" example:"2000" description:"状态码"`
|
||||
Message string `json:"message,omitempty" example:"操作成功" description:"提示消息"`
|
||||
}
|
||||
|
||||
// PkgResponse 打包响应消息
|
||||
func (m *Response) PkgResponse() {
|
||||
m.SetCode()
|
||||
// ...
|
||||
}
|
||||
|
||||
// SetCode 设置状态码
|
||||
func (m *Response) SetCode(code ...int) {
|
||||
if len(code) > 0 {
|
||||
m.Code = code[0]
|
||||
return
|
||||
}
|
||||
|
||||
// 默认值,转为成功的状态码
|
||||
if m.Code == 0 {
|
||||
m.Code = consts.TCPMsgCodeSuccess
|
||||
}
|
||||
}
|
||||
|
||||
// GetError 获取响应中的错误
|
||||
func (m *Response) GetError() (err error) {
|
||||
if m.Code != consts.TCPMsgCodeSuccess {
|
||||
if m.Message == "" {
|
||||
m.Message = "操作失败"
|
||||
}
|
||||
err = gerror.New(m.Message)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// ServerHeartbeat 心跳
|
||||
type ServerHeartbeat struct {
|
||||
}
|
||||
|
||||
// ResponseServerHeartbeat 响应心跳
|
||||
type ResponseServerHeartbeat struct {
|
||||
Response
|
||||
}
|
||||
|
||||
// ServerLogin 服务登录
|
||||
type ServerLogin struct {
|
||||
RpcMsg
|
||||
Group string `json:"group" description:"分组"`
|
||||
Name string `json:"name" description:"名称"`
|
||||
}
|
||||
|
||||
// ResponseServerLogin 响应服务登录
|
||||
type ResponseServerLogin struct {
|
||||
Response
|
||||
}
|
||||
|
||||
// ServerOffline 服务离线
|
||||
type ServerOffline struct {
|
||||
RpcMsg
|
||||
}
|
||||
|
||||
// ResponseServerOffline 响应服务离线
|
||||
type ResponseServerOffline struct {
|
||||
Response
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package msgin
|
||||
|
||||
import (
|
||||
"hotgo/internal/model/input/sysin"
|
||||
)
|
||||
|
||||
// CronDelete 删除任务
|
||||
type CronDelete struct {
|
||||
RpcMsg
|
||||
sysin.CronDeleteInp
|
||||
}
|
||||
|
||||
type ResponseCronDelete struct {
|
||||
Response
|
||||
sysin.CronDeleteModel
|
||||
}
|
||||
|
||||
// CronEdit 编辑任务
|
||||
type CronEdit struct {
|
||||
RpcMsg
|
||||
sysin.CronEditInp
|
||||
}
|
||||
|
||||
type ResponseCronEdit struct {
|
||||
Response
|
||||
sysin.CronEditModel
|
||||
}
|
||||
|
||||
// CronStatus 修改任务状态
|
||||
type CronStatus struct {
|
||||
RpcMsg
|
||||
sysin.CronStatusInp
|
||||
}
|
||||
|
||||
type ResponseCronStatus struct {
|
||||
Response
|
||||
sysin.CronStatusModel
|
||||
}
|
||||
|
||||
// CronOnlineExec 在线执行
|
||||
type CronOnlineExec struct {
|
||||
RpcMsg
|
||||
sysin.OnlineExecInp
|
||||
}
|
||||
|
||||
type ResponseCronOnlineExec struct {
|
||||
Response
|
||||
sysin.OnlineExecModel
|
||||
}
|
||||
11
server/internal/model/input/servmsgin/auth.go
Normal file
11
server/internal/model/input/servmsgin/auth.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package servmsgin
|
||||
|
||||
import "github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
// AuthSummaryModel 授权信息
|
||||
type AuthSummaryModel struct {
|
||||
EndAt *gtime.Time `json:"end_at" description:"授权过期时间"`
|
||||
Online int `json:"online" description:"在线人数"`
|
||||
// 请填充你的授权数据
|
||||
// ...
|
||||
}
|
||||
9
server/internal/model/input/servmsgin/example.go
Normal file
9
server/internal/model/input/servmsgin/example.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package servmsgin
|
||||
|
||||
import "github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
// ExampleHelloModel 授权信息
|
||||
type ExampleHelloModel struct {
|
||||
Desc string `json:"desc" description:"描述信息"`
|
||||
Timestamp *gtime.Time `json:"timestamp" description:"服务器时间"`
|
||||
}
|
||||
@@ -16,25 +16,26 @@ import (
|
||||
// AddonsListInp 获取列表
|
||||
type AddonsListInp struct {
|
||||
form.PageReq
|
||||
Name string `json:"name"`
|
||||
Group int `json:"group"`
|
||||
Status int `json:"status"`
|
||||
Name string `json:"name" dc:"插件名称"`
|
||||
Group int `json:"group" dc:"分组"`
|
||||
Status int `json:"status" dc:"安装状态"`
|
||||
}
|
||||
|
||||
type AddonsListModel struct {
|
||||
addons.Skeleton
|
||||
GroupName string `json:"groupName" dc:"分组名称"`
|
||||
InstallVersion string `json:"installVersion" dc:"安装版本"`
|
||||
InstallStatus int `json:"installStatus" dc:"安装状态"`
|
||||
CanSave bool `json:"canSave" dc:"是否可以更新"`
|
||||
GroupName string `json:"groupName" dc:"分组名称"`
|
||||
InstallVersion string `json:"installVersion" dc:"安装版本"`
|
||||
InstallStatus int `json:"installStatus" dc:"安装状态"`
|
||||
CanSave bool `json:"canSave" dc:"是否可以更新"`
|
||||
}
|
||||
|
||||
// AddonsSelectsInp 选项
|
||||
type AddonsSelectsInp struct {
|
||||
}
|
||||
|
||||
type AddonsSelectsModel struct {
|
||||
GroupType form.Selects `json:"groupType" dc:"分组类型"`
|
||||
Status form.Selects `json:"status" dc:"安装状态"`
|
||||
Status form.Selects `json:"status" dc:"安装状态"`
|
||||
}
|
||||
|
||||
// AddonsBuildInp 提交生成
|
||||
@@ -52,7 +53,6 @@ func (in *AddonsBuildInp) Filter(ctx context.Context) (err error) {
|
||||
err = gerror.New("插件名称格式不正确,字母开头,只能包含字母、数字和下划线,长度在2~24之间")
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -6,35 +6,74 @@
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"hotgo/internal/library/storager"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
"hotgo/utility/validate"
|
||||
)
|
||||
|
||||
// AttachmentDeleteInp 删除附件
|
||||
type AttachmentDeleteInp struct {
|
||||
Id interface{}
|
||||
Id interface{} `json:"id" v:"required#附件ID不能为空" dc:"附件ID"`
|
||||
}
|
||||
|
||||
type AttachmentDeleteModel struct{}
|
||||
|
||||
// AttachmentViewInp 获取附件信息
|
||||
type AttachmentViewInp struct {
|
||||
Id int64
|
||||
Id int64 `json:"id" v:"required#附件ID不能为空" dc:"附件ID"`
|
||||
}
|
||||
|
||||
type AttachmentViewModel struct {
|
||||
entity.SysAttachment
|
||||
}
|
||||
|
||||
// AttachmentClearKindInp 清空上传类型
|
||||
type AttachmentClearKindInp struct {
|
||||
Kind string `json:"kind" v:"required#上传类型不能为空" dc:"上传类型"`
|
||||
}
|
||||
|
||||
func (in *AttachmentClearKindInp) Filter(ctx context.Context) (err error) {
|
||||
if !validate.InSlice(storager.KindSlice, in.Kind) {
|
||||
err = gerror.New("上传类型是无效的")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// AttachmentListInp 获取附件列表
|
||||
type AttachmentListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
MemberId int64
|
||||
Drive string
|
||||
MemberId int64 `json:"member_id" dc:"用户ID"`
|
||||
Name string `json:"name" dc:"文件名称"`
|
||||
Drive string `json:"drive" dc:"驱动"`
|
||||
Kind string `json:"kind" dc:"上传类型"`
|
||||
UpdatedAt []*gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
type AttachmentListModel struct {
|
||||
entity.SysAttachment
|
||||
SizeFormat string `json:"sizeFormat" description:"长度"`
|
||||
SizeFormat string `json:"sizeFormat" dc:"大小"`
|
||||
}
|
||||
|
||||
// AttachmentChooserListInp 获取附件列表
|
||||
type AttachmentChooserListInp struct {
|
||||
form.PageReq
|
||||
Drive string `json:"drive" dc:"驱动"`
|
||||
Kind string `json:"kind" dc:"上传类型"`
|
||||
UpdatedAt []int64 `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
type AttachmentChooserListModel struct {
|
||||
entity.SysAttachment
|
||||
SizeFormat string `json:"sizeFormat" dc:"大小"`
|
||||
}
|
||||
|
||||
// AttachmentClearInp 清空分类
|
||||
type AttachmentClearInp struct {
|
||||
Kind string `json:"kind" dc:"上传类型"`
|
||||
}
|
||||
|
||||
@@ -3,38 +3,34 @@
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
"hotgo/utility/validate"
|
||||
)
|
||||
|
||||
// BlacklistMaxSortInp 最大排序
|
||||
type BlacklistMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type BlacklistMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// BlacklistEditInp 修改/新增字典数据
|
||||
// BlacklistEditInp 修改/新增黑名单数据
|
||||
type BlacklistEditInp struct {
|
||||
entity.SysBlacklist
|
||||
}
|
||||
|
||||
type BlacklistEditModel struct{}
|
||||
|
||||
// BlacklistDeleteInp 删除字典类型
|
||||
// BlacklistDeleteInp 删除黑名单类型
|
||||
type BlacklistDeleteInp struct {
|
||||
Id interface{}
|
||||
Id interface{} `json:"id" v:"required#黑名单ID不能为空" dc:"黑名单ID"`
|
||||
}
|
||||
|
||||
type BlacklistDeleteModel struct{}
|
||||
|
||||
// BlacklistViewInp 获取信息
|
||||
type BlacklistViewInp struct {
|
||||
Id int64
|
||||
Id int64 `json:"id" v:"required#黑名单ID不能为空" dc:"黑名单ID"`
|
||||
}
|
||||
|
||||
type BlacklistViewModel struct {
|
||||
@@ -44,9 +40,15 @@ type BlacklistViewModel struct {
|
||||
// BlacklistListInp 获取列表
|
||||
type BlacklistListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
|
||||
form.StatusReq
|
||||
Ip string
|
||||
Ip string `json:"ip" dc:"IP"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
CreatedAt []int64 `json:"createdAt" dc:"创建时间"`
|
||||
}
|
||||
|
||||
func (in *BlacklistListInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type BlacklistListModel struct {
|
||||
@@ -57,4 +59,23 @@ type BlacklistListModel struct {
|
||||
type BlacklistStatusInp struct {
|
||||
entity.SysBlacklist
|
||||
}
|
||||
|
||||
func (in *BlacklistStatusInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Id <= 0 {
|
||||
err = gerror.New("ID不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
if in.Status <= 0 {
|
||||
err = gerror.New("状态不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
if !validate.InSlice(consts.StatusSlice, in.Status) {
|
||||
err = gerror.New("状态不正确")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type BlacklistStatusModel struct{}
|
||||
|
||||
@@ -3,20 +3,12 @@
|
||||
// @Copyright Copyright (c) 2023 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"`
|
||||
@@ -27,75 +19,7 @@ type UpdateConfigInp struct {
|
||||
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:"deptName"`
|
||||
RoleName string `json:"roleName"`
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ type CronViewModel struct {
|
||||
// CronListInp 获取列表
|
||||
type CronListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
|
||||
form.StatusReq
|
||||
Name string
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ func (in *CronGroupEditInp) Filter(ctx context.Context) (err error) {
|
||||
err = gerror.New("上级分组不能是自己")
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -83,7 +82,7 @@ type CronGroupViewModel struct {
|
||||
// CronGroupListInp 获取列表
|
||||
type CronGroupListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
|
||||
form.StatusReq
|
||||
Name string
|
||||
}
|
||||
@@ -112,7 +111,6 @@ func (in *CronGroupStatusInp) Filter(ctx context.Context) (err error) {
|
||||
err = gerror.New("状态不正确")
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
// @AutoGenerate Version 2.7.3
|
||||
// @AutoGenerate Version 2.7.6
|
||||
package sysin
|
||||
|
||||
import (
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
// DictDataEditInp 修改/新增字典数据
|
||||
type DictDataEditInp struct {
|
||||
entity.SysDictData
|
||||
TypeID int64
|
||||
TypeID int64 `json:"typeID" dc:"字典类型ID"`
|
||||
}
|
||||
|
||||
func (in *DictDataEditInp) Filter(ctx context.Context) (err error) {
|
||||
@@ -28,7 +28,6 @@ func (in *DictDataEditInp) Filter(ctx context.Context) (err error) {
|
||||
err = gerror.New("字典类型不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -63,18 +62,19 @@ type DictDataInsertFields struct {
|
||||
|
||||
// DictDataDeleteInp 删除字典数据
|
||||
type DictDataDeleteInp struct {
|
||||
Id interface{}
|
||||
Id interface{} `json:"id" v:"required#字典数据ID不能为空" dc:"字典数据ID"`
|
||||
}
|
||||
|
||||
type DictDataDeleteModel struct{}
|
||||
|
||||
// DictDataListInp 获取列表
|
||||
type DictDataListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
|
||||
form.StatusReq
|
||||
TypeID int64
|
||||
Type string
|
||||
Label string
|
||||
TypeID int64 `json:"typeId" v:"required#字典类型ID不能为空" dc:"字典类型ID"`
|
||||
Type string `json:"type"`
|
||||
Label string `json:"label"`
|
||||
}
|
||||
|
||||
type DictDataListModel struct {
|
||||
@@ -85,7 +85,7 @@ type DictDataListModel struct {
|
||||
|
||||
// DataSelectInp 获取指定字典选项
|
||||
type DataSelectInp struct {
|
||||
Type string
|
||||
Type string `in:"path" v:"required#字典类型不能为空" dc:"字典类型"`
|
||||
}
|
||||
|
||||
type DataSelectModel []*SelectData
|
||||
|
||||
@@ -27,7 +27,6 @@ func (in *DictTypeEditInp) Filter(ctx context.Context) (err error) {
|
||||
err = gerror.New("上级字典不能是自己")
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -56,8 +55,9 @@ type DictTypeInsertFields struct {
|
||||
|
||||
// DictTypeDeleteInp 删除字典类型
|
||||
type DictTypeDeleteInp struct {
|
||||
Id interface{}
|
||||
Id interface{} `json:"id" v:"required#字典类型ID不能为空" dc:"字典类型ID"`
|
||||
}
|
||||
|
||||
type DictTypeDeleteModel struct{}
|
||||
|
||||
// DictTreeSelectInp 获取类型关系树选项
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
@@ -16,12 +15,14 @@ import (
|
||||
type EmsLogEditInp struct {
|
||||
entity.SysEmsLog
|
||||
}
|
||||
|
||||
type EmsLogEditModel struct{}
|
||||
|
||||
// EmsLogDeleteInp 删除
|
||||
type EmsLogDeleteInp struct {
|
||||
Id interface{} `json:"id" v:"required#邮件记录ID不能为空" dc:"邮件记录ID"`
|
||||
}
|
||||
|
||||
type EmsLogDeleteModel struct{}
|
||||
|
||||
// EmsLogViewInp 获取信息
|
||||
@@ -36,7 +37,7 @@ type EmsLogViewModel struct {
|
||||
// EmsLogListInp 获取列表
|
||||
type EmsLogListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
|
||||
form.StatusReq
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
@@ -50,6 +51,7 @@ type EmsLogListModel struct {
|
||||
type EmsLogStatusInp struct {
|
||||
entity.SysSmsLog
|
||||
}
|
||||
|
||||
type EmsLogStatusModel struct{}
|
||||
|
||||
// SendEmsInp 发送邮件
|
||||
|
||||
@@ -18,11 +18,11 @@ import (
|
||||
|
||||
// GenCodesMaxSortInp 最大排序
|
||||
type GenCodesMaxSortInp struct {
|
||||
Id int64
|
||||
Id int64 `json:"id" dc:"生成代码ID"`
|
||||
}
|
||||
|
||||
type GenCodesMaxSortModel struct {
|
||||
Sort int
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
// GenCodesEditInp 修改/新增数据
|
||||
@@ -40,13 +40,14 @@ type GenCodesEditModel struct {
|
||||
|
||||
// GenCodesDeleteInp 删除
|
||||
type GenCodesDeleteInp struct {
|
||||
Id interface{}
|
||||
Id interface{} `json:"id" v:"required#生成代码ID不能为空" dc:"生成代码ID"`
|
||||
}
|
||||
|
||||
type GenCodesDeleteModel struct{}
|
||||
|
||||
// GenCodesViewInp 获取信息
|
||||
type GenCodesViewInp struct {
|
||||
Id int64
|
||||
Id int64 `json:"id" v:"required#生成代码ID不能为空" dc:"生成代码ID"`
|
||||
}
|
||||
|
||||
type GenCodesViewModel struct {
|
||||
@@ -57,8 +58,8 @@ type GenCodesViewModel struct {
|
||||
type GenCodesListInp struct {
|
||||
form.PageReq
|
||||
form.StatusReq
|
||||
GenType int `json:"genType"`
|
||||
VarName string `json:"varName"`
|
||||
GenType int `json:"genType" dc:"生成类型"`
|
||||
VarName string `json:"varName" dc:"实体"`
|
||||
}
|
||||
|
||||
type GenCodesListModel struct {
|
||||
@@ -76,6 +77,7 @@ type GenCodesStatusModel struct{}
|
||||
// GenCodesSelectsInp 选项
|
||||
type GenCodesSelectsInp struct {
|
||||
}
|
||||
|
||||
type GenCodesSelectsModel struct {
|
||||
GenType GenTypeSelects `json:"genType" dc:"生成类型"`
|
||||
Db form.Selects `json:"db" dc:"数据库选项"`
|
||||
@@ -100,6 +102,7 @@ type GenTypeSelect struct {
|
||||
}
|
||||
|
||||
type GenTemplateSelects []*GenTemplateSelect
|
||||
|
||||
type GenTemplateSelect struct {
|
||||
Value interface{} `json:"value"`
|
||||
Label string `json:"label"`
|
||||
@@ -110,9 +113,11 @@ type GenTemplateSelect struct {
|
||||
func (p GenTemplateSelects) Len() int {
|
||||
return len(p)
|
||||
}
|
||||
|
||||
func (p GenTemplateSelects) Swap(i, j int) {
|
||||
p[i], p[j] = p[j], p[i]
|
||||
}
|
||||
|
||||
func (p GenTemplateSelects) Less(i, j int) bool {
|
||||
return gconv.Int64(p[j].Value) > gconv.Int64(p[i].Value)
|
||||
}
|
||||
@@ -120,9 +125,11 @@ func (p GenTemplateSelects) Less(i, j int) bool {
|
||||
func (p GenTypeSelects) Len() int {
|
||||
return len(p)
|
||||
}
|
||||
|
||||
func (p GenTypeSelects) Swap(i, j int) {
|
||||
p[i], p[j] = p[j], p[i]
|
||||
}
|
||||
|
||||
func (p GenTypeSelects) Less(i, j int) bool {
|
||||
return gconv.Int64(p[j].Value) > gconv.Int64(p[i].Value)
|
||||
}
|
||||
@@ -131,6 +138,7 @@ func (p GenTypeSelects) Less(i, j int) bool {
|
||||
type GenCodesTableSelectInp struct {
|
||||
Name string `json:"name" dc:"数据库配置名称"`
|
||||
}
|
||||
|
||||
type GenCodesTableSelectModel struct {
|
||||
Value string `json:"value"`
|
||||
Label string `json:"label"`
|
||||
@@ -146,6 +154,7 @@ type GenCodesColumnSelectInp struct {
|
||||
Name string `json:"name" dc:"数据库配置名称"`
|
||||
Table string `json:"table" dc:"表名称"`
|
||||
}
|
||||
|
||||
type GenCodesColumnSelectModel struct {
|
||||
Value string `json:"value"`
|
||||
Label string `json:"label"`
|
||||
@@ -159,6 +168,7 @@ type GenCodesColumnListInp struct {
|
||||
IsLink int64 `json:"isLink" dc:"是否是关联表"`
|
||||
Alias string `json:"alias" dc:"关联表别名"`
|
||||
}
|
||||
|
||||
type GenCodesColumnListModel struct {
|
||||
model.GenCodesColumn
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package sysin
|
||||
|
||||
import (
|
||||
@@ -14,18 +13,15 @@ import (
|
||||
// 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
|
||||
Module string `json:"module" dc:"应用端口"`
|
||||
MemberId int `json:"member_id" dc:"用户ID"`
|
||||
TakeUpTime int `json:"take_up_time" dc:"请求耗时"`
|
||||
Method string `json:"method" dc:"请求方式"`
|
||||
Url string `json:"url" dc:"请求路径"`
|
||||
Ip string `json:"ip" dc:"访问IP"`
|
||||
ErrorCode string `json:"error_code" dc:"状态码"`
|
||||
CreatedAt []int64 `json:"created_at" dc:"创建时间"`
|
||||
}
|
||||
|
||||
type LogListModel struct {
|
||||
@@ -36,7 +32,7 @@ type LogListModel struct {
|
||||
|
||||
// LogViewInp 获取信息
|
||||
type LogViewInp struct {
|
||||
Id string
|
||||
Id string `json:"id" v:"required#日志ID不能为空" description:"日志ID"`
|
||||
}
|
||||
|
||||
type LogViewModel struct {
|
||||
@@ -46,6 +42,7 @@ type LogViewModel struct {
|
||||
|
||||
// LogDeleteInp 删除
|
||||
type LogDeleteInp struct {
|
||||
Id interface{}
|
||||
Id interface{} `json:"id" v:"required#日志ID不能为空" description:"日志ID"`
|
||||
}
|
||||
|
||||
type LogDeleteModel struct{}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user