This commit is contained in:
孟帅
2022-02-25 17:11:17 +08:00
parent 9bd05abb2c
commit 8f3d679a57
897 changed files with 95731 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
//
// @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 apiForm
import (
"github.com/bufanyun/hotgo/app/com"
"github.com/gogf/gf/v2/frame/g"
)
// 获取lang信息
type BaseLangReq struct {
g.Meta `path:"/base/lang" method:"get" tags:"基础" summary:"获取lang信息"`
L string `json:"l" v:"required#语言不能为空" description:"语言"`
}
type BaseLangRes struct {
}
// 获取登录验证码
type IpLocationReq struct {
g.Meta `path:"/base/ip_location" method:"get" tags:"基础" summary:"获取IP归属地信息"`
Ip string `json:"ip" v:"required#ip不能为空" description:"ipv4地址"`
}
type IpLocationRes struct {
com.IpLocationData
}
type ExportReq struct {
g.Meta `path:"/base/export" method:"get" tags:"字典" summary:"导出字典类型"`
}
type ExportRes struct{}

View File

@@ -0,0 +1,13 @@
package apiForm
import (
"github.com/bufanyun/hotgo/app/model/entity"
"github.com/gogf/gf/v2/frame/g"
)
// 获取指定字典类型的属性数据
type DictAttributeReq struct {
Type string `json:"type" example:"sys_common_status" v:"required#字典类型不能为空" description:"字典类型"`
g.Meta `path:"/dict/attribute" method:"get" tags:"字典" summary:"获取指定字典类型的属性数据"`
}
type DictAttributeRes []*entity.SysDictData

View File

@@ -0,0 +1,47 @@
package apiForm
import (
"github.com/bufanyun/hotgo/app/form"
"github.com/bufanyun/hotgo/app/form/input"
"github.com/gogf/gf/v2/frame/g"
)
// 清空日志
type LogClearReq struct {
g.Meta `path:"/log/clear" method:"post" tags:"日志" summary:"清空日志"`
}
type LogClearRes struct{}
// 导出
type LogExportReq struct {
form.PageReq
form.RangeDateReq
Module string `json:"module" description:"应用端口"`
MemberId int `json:"member_id" description:"用户ID"`
TakeUpTime int `json:"take_up_time" description:"请求耗时"`
Method string `json:"method" description:"请求方式"`
Url string `json:"url" description:"请求路径"`
Ip string `json:"ip" description:"访问IP"`
ErrorCode string `json:"error_code" description:"状态码"`
g.Meta `path:"/log/export" method:"get" tags:"日志" summary:"导出日志"`
}
type LogExportRes struct{}
// 获取菜单列表
type LogListReq struct {
form.PageReq
form.RangeDateReq
Module string `json:"module" description:"应用端口"`
MemberId int `json:"member_id" description:"用户ID"`
TakeUpTime int `json:"take_up_time" description:"请求耗时"`
Method string `json:"method" description:"请求方式"`
Url string `json:"url" description:"请求路径"`
Ip string `json:"ip" description:"访问IP"`
ErrorCode string `json:"error_code" description:"状态码"`
g.Meta `path:"/log/list" method:"get" tags:"日志" summary:"获取日志列表"`
}
type LogListRes struct {
List []*input.LogListModel `json:"list" description:"数据列表"`
form.PageRes
}

View File

@@ -0,0 +1,37 @@
package apiForm
import (
"github.com/bufanyun/hotgo/app/model"
"github.com/gogf/gf/v2/frame/g"
)
// 注销登录
type LoginLogoutReq struct {
g.Meta `path:"/login/logout" method:"get" tags:"登录" summary:"注销登录"`
}
type LoginLogoutRes struct{}
// 登录效验
type LoginCheckReq struct {
g.Meta `path:"/login/check" method:"get" tags:"登录" summary:"登录效验"`
}
type LoginCheckRes struct {
IsValidCodeLogin bool `json:"isValidCodeLogin" description:"是否验证码"`
Message string `json:"message" description:"消息"`
Result string `json:"result" description:"响应"`
// Sessionid string `json:"sessionid" description:"sessionid"`
}
// 提交登录
type LoginReq struct {
g.Meta `path:"/login/sign" method:"post" tags:"登录" summary:"提交登录"`
Username string `json:"username" v:"required#用户名不能为空" description:"用户名"`
Password string `json:"password" v:"required#密码不能为空" description:"密码"`
Cid string `json:"cid" v:"required#验证码ID不能为空" description:"验证码ID"`
Code string `json:"code" v:"required#验证码不能为空" description:"验证码"`
Device string `json:"device" description:"登录设备"`
}
type LoginRes struct {
model.Identity
Token string `json:"token" v:"" description:"登录token"`
}

View File

@@ -0,0 +1,20 @@
package apiForm
import (
"github.com/bufanyun/hotgo/app/form/input"
"github.com/gogf/gf/v2/frame/g"
)
// 获取登录用户的基本信息
type MemberProfileReq struct {
g.Meta `path:"/member/profile" method:"get" tags:"会员" summary:"获取登录用户的基本信息"`
}
type MemberProfileRes struct {
PostGroup string `json:"postGroup" description:"岗位名称"`
RoleGroup string `json:"roleGroup" description:"角色名称"`
User *input.AdminMemberViewModel `json:"user" description:"用户基本信息"`
SysDept *input.AdminDeptViewModel `json:"sysDept" description:"部门信息"`
SysRoles []*input.AdminRoleListModel `json:"sysRoles" description:"角色列表"`
PostIds int64 `json:"postIds" description:"当前岗位"`
RoleIds int64 `json:"roleIds" description:"当前角色"`
}