mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-12 12:13:51 +08:00
v2.0
This commit is contained in:
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 {
|
||||
}
|
||||
Reference in New Issue
Block a user