mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-10 11:13:44 +08:00
版本预发布
This commit is contained in:
@@ -12,15 +12,34 @@ import (
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// GetIdByCodeInp 通过邀请码获取会员ID
|
||||
// MemberUpdateCashInp 更新会员提现信息
|
||||
type MemberUpdateCashInp struct {
|
||||
Name string `json:"name" v:"required#支付宝姓名不能为空" dc:"支付宝姓名"`
|
||||
PayeeCode string `json:"payeeCode" v:"required#支付宝收款码不能为空" dc:"支付宝收款码"`
|
||||
Account string `json:"account" v:"required#支付宝账号不能为空" dc:"支付宝账号"`
|
||||
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
}
|
||||
|
||||
type MemberUpdateEmailInp struct {
|
||||
Email string `json:"email" v:"required#换绑邮箱不能为空" dc:"换绑邮箱"`
|
||||
Code string `json:"code" dc:"原邮箱验证码"`
|
||||
}
|
||||
|
||||
// MemberUpdateMobileInp 换绑手机号
|
||||
type MemberUpdateMobileInp struct {
|
||||
Mobile string `json:"mobile" v:"required#换绑手机号不能为空" dc:"换绑手机号"`
|
||||
Code string `json:"code" dc:"原号码短信验证码"`
|
||||
}
|
||||
|
||||
// GetIdByCodeInp 通过邀请码获取用户ID
|
||||
type GetIdByCodeInp struct {
|
||||
Code string `json:"code""`
|
||||
Code string `json:"code"`
|
||||
}
|
||||
type GetIdByCodeModel struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
// MemberProfileInp 获取指定会员资料
|
||||
// MemberProfileInp 获取指定用户资料
|
||||
type MemberProfileInp struct {
|
||||
Id int64
|
||||
}
|
||||
@@ -34,30 +53,34 @@ type MemberProfileModel struct {
|
||||
RoleIds int64 `json:"roleIds" description:"当前角色"`
|
||||
}
|
||||
|
||||
// MemberUpdateProfileInp 更新会员资料
|
||||
// MemberUpdateProfileInp 更新用户资料
|
||||
type MemberUpdateProfileInp struct {
|
||||
Mobile int
|
||||
Email string
|
||||
Realname string
|
||||
Avatar string `json:"avatar" v:"required#头像不能为空" dc:"头像"`
|
||||
RealName string `json:"realName" v:"required#真实姓名不能为空" dc:"真实姓名"`
|
||||
Qq string `json:"qq" dc:"QQ"`
|
||||
Birthday *gtime.Time `json:"birthday" dc:"生日"`
|
||||
Sex int `json:"sex" dc:"性别"`
|
||||
Address string `json:"address" dc:"联系地址"`
|
||||
CityId int64 `json:"cityId" dc:"城市编码"`
|
||||
}
|
||||
|
||||
// MemberUpdatePwdInp 修改登录密码
|
||||
type MemberUpdatePwdInp struct {
|
||||
Id int64
|
||||
OldPassword string
|
||||
NewPassword string
|
||||
OldPassword string `json:"oldPassword" v:"required#原密码不能为空" dc:"原密码"`
|
||||
NewPassword string `json:"newPassword" v:"required|length:6,16#新密码不能为空#新密码需在6~16之间" dc:"新密码"`
|
||||
}
|
||||
|
||||
// MemberResetPwdInp 重置密码
|
||||
type MemberResetPwdInp struct {
|
||||
Password string
|
||||
Id int64
|
||||
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
}
|
||||
|
||||
// MemberEmailUniqueInp 邮箱是否唯一
|
||||
type MemberEmailUniqueInp struct {
|
||||
Email string
|
||||
Id int64
|
||||
Email string `json:"email" v:"required#邮箱不能为空" dc:"邮箱"`
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
}
|
||||
|
||||
type MemberEmailUniqueModel struct {
|
||||
@@ -66,8 +89,8 @@ type MemberEmailUniqueModel struct {
|
||||
|
||||
// MemberMobileUniqueInp 手机号是否唯一
|
||||
type MemberMobileUniqueInp struct {
|
||||
Mobile string
|
||||
Id int64
|
||||
Mobile string `json:"mobile" v:"required#手机号不能为空" dc:"手机号"`
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
}
|
||||
|
||||
type MemberMobileUniqueModel struct {
|
||||
@@ -76,8 +99,8 @@ type MemberMobileUniqueModel struct {
|
||||
|
||||
// MemberNameUniqueInp 名称是否唯一
|
||||
type MemberNameUniqueInp struct {
|
||||
Username string
|
||||
Id int64
|
||||
Username string `json:"username" v:"required#用户名称不能为空" dc:"用户名称"`
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
}
|
||||
|
||||
type MemberNameUniqueModel struct {
|
||||
@@ -86,7 +109,7 @@ type MemberNameUniqueModel struct {
|
||||
|
||||
// MemberMaxSortInp 最大排序
|
||||
type MemberMaxSortInp struct {
|
||||
Id int64
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
}
|
||||
|
||||
type MemberMaxSortModel struct {
|
||||
@@ -101,7 +124,7 @@ type MemberEditInp struct {
|
||||
DeptId int64 `json:"deptId" v:"required#部门不能为空" description:"部门ID"`
|
||||
Username string `json:"username" v:"required#账号不能为空" description:"帐号"`
|
||||
Password string `json:"password" description:"密码"`
|
||||
Realname string `json:"realName" description:"真实姓名"`
|
||||
RealName string `json:"realName" description:"真实姓名"`
|
||||
Avatar string `json:"avatar" description:"头像"`
|
||||
Sex string `json:"sex" description:"性别"`
|
||||
Qq string `json:"qq" description:"qq"`
|
||||
@@ -120,8 +143,8 @@ type MemberEditInp struct {
|
||||
|
||||
type MemberAddInp struct {
|
||||
MemberEditInp
|
||||
PasswordHash string `json:"passwordHash" description:"密码hash"`
|
||||
Salt string `json:"salt" description:"密码盐"`
|
||||
PasswordHash string `json:"passwordHash" description:"密码hash"`
|
||||
Salt string `json:"salt" description:"密码盐"`
|
||||
Pid int64 `json:"pid" description:"上级ID"`
|
||||
Level int `json:"level" description:"等级"`
|
||||
Tree string `json:"tree" description:"关系树"`
|
||||
@@ -131,17 +154,19 @@ type MemberEditModel struct{}
|
||||
|
||||
// MemberDeleteInp 删除字典类型
|
||||
type MemberDeleteInp struct {
|
||||
Id interface{}
|
||||
Id interface{} `json:"id" v:"required#用户ID不能为空" dc:"用户ID"`
|
||||
}
|
||||
type MemberDeleteModel struct{}
|
||||
|
||||
// MemberViewInp 获取信息
|
||||
type MemberViewInp struct {
|
||||
Id int64
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
}
|
||||
|
||||
type MemberViewModel struct {
|
||||
entity.AdminMember
|
||||
DeptName string `json:"deptName" description:"所属部门"`
|
||||
RoleName string `json:"roleName" description:"所属角色"`
|
||||
}
|
||||
|
||||
// MemberListInp 获取列表
|
||||
@@ -149,21 +174,21 @@ type MemberListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Name string
|
||||
Code string
|
||||
DeptId int
|
||||
Mobile int
|
||||
Username string
|
||||
Realname string
|
||||
CreatedAt []int64
|
||||
DeptId int `json:"deptId" dc:"部门ID"`
|
||||
Mobile int `json:"mobile" dc:"手机号"`
|
||||
Username string `json:"username" dc:"用户名"`
|
||||
RealName string `json:"realName" dc:"真实姓名"`
|
||||
Name string `json:"name" dc:"岗位名称"`
|
||||
Code string `json:"code" dc:"岗位编码"`
|
||||
CreatedAt []int64 `json:"createdAt" dc:"创建时间"`
|
||||
}
|
||||
|
||||
type MemberListModel struct {
|
||||
entity.AdminMember
|
||||
DeptName string `json:"deptName"`
|
||||
RoleName string `json:"roleName"`
|
||||
PostIds []int64 `json:"postIds"`
|
||||
DeptId int64 `json:"deptId" description:"部门ID"`
|
||||
DeptName string `json:"deptName" description:"所属部门"`
|
||||
RoleName string `json:"roleName" description:"所属角色"`
|
||||
PostIds []int64 `json:"postIds" description:"岗位"`
|
||||
DeptId int64 `json:"deptId" description:"部门ID"`
|
||||
}
|
||||
|
||||
// MemberLoginInp 登录
|
||||
@@ -172,18 +197,42 @@ type MemberLoginInp struct {
|
||||
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:"角色信息"`
|
||||
Id int64 `json:"id" description:"用户ID"`
|
||||
Token string `json:"token" description:"登录token"`
|
||||
Expires int64 `json:"expires" description:"登录有效期"`
|
||||
}
|
||||
|
||||
type LoginMemberInfoModel struct {
|
||||
Id int64 `json:"id" description:"用户ID"`
|
||||
DeptName string `json:"deptName" description:"所属部门"`
|
||||
RoleName string `json:"roleName" description:"所属角色"`
|
||||
Permissions []string `json:"permissions" description:"角色信息"`
|
||||
DeptId int64 `json:"-" description:"部门ID"`
|
||||
RoleId int64 `json:"-" description:"角色ID"`
|
||||
Username string `json:"username" description:"用户名"`
|
||||
RealName string `json:"realName" description:"姓名"`
|
||||
Avatar string `json:"avatar" description:"头像"`
|
||||
Balance float64 `json:"balance" description:"余额"`
|
||||
Sex int `json:"sex" description:"性别"`
|
||||
Qq string `json:"qq" description:"qq"`
|
||||
Email string `json:"email" description:"邮箱"`
|
||||
Mobile string `json:"mobile" description:"手机号码"`
|
||||
Birthday *gtime.Time `json:"birthday" description:"生日"`
|
||||
CityId int64 `json:"cityId" description:"城市编码"`
|
||||
Address string `json:"address" description:"联系地址"`
|
||||
Cash *MemberCash `json:"cash" description:"收款信息"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"`
|
||||
*MemberLoginStatModel
|
||||
}
|
||||
|
||||
// MemberLoginPermissions 登录用户角色信息
|
||||
type MemberLoginPermissions struct {
|
||||
Label string `json:"label" description:"标签"`
|
||||
Value string `json:"value" description:"值"`
|
||||
type MemberLoginPermissions []string
|
||||
|
||||
// MemberCash 用户提现配置
|
||||
type MemberCash struct {
|
||||
Name string `json:"name" dc:"收款人姓名"`
|
||||
Account string `json:"account" dc:"收款账户"`
|
||||
PayeeCode string `json:"payeeCode" dc:"收款码"`
|
||||
}
|
||||
|
||||
// MemberStatusInp 更新状态
|
||||
@@ -191,3 +240,25 @@ type MemberStatusInp struct {
|
||||
entity.AdminPost
|
||||
}
|
||||
type MemberStatusModel struct{}
|
||||
|
||||
// MemberSelectInp 获取可选的后台用户选项
|
||||
type MemberSelectInp struct {
|
||||
}
|
||||
|
||||
type MemberSelectModel struct {
|
||||
Value int64 `json:"value" dc:"用户ID"`
|
||||
Label string `json:"label" dc:"真实姓名"`
|
||||
Username string `json:"username" dc:"用户名"`
|
||||
Avatar string `json:"avatar" dc:"头像"`
|
||||
}
|
||||
|
||||
// MemberLoginStatInp 用户登录统计
|
||||
type MemberLoginStatInp struct {
|
||||
MemberId int64
|
||||
}
|
||||
|
||||
type MemberLoginStatModel struct {
|
||||
LoginCount int `json:"loginCount" dc:"登录次数"`
|
||||
LastLoginAt *gtime.Time `json:"lastLoginAt" dc:"最后登录时间"`
|
||||
LastLoginIp string `json:"lastLoginIp" dc:"最后登录IP"`
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
// MenuMaxSortReq 菜单最大排序
|
||||
type MenuMaxSortReq struct {
|
||||
g.Meta `path:"/menu/max_sort" method:"get" tags:"菜单" summary:"菜单最大排序"`
|
||||
g.Meta `path:"/menu/maxSort" method:"get" tags:"菜单" summary:"菜单最大排序"`
|
||||
Id int64 `json:"id" dc:"菜单ID"`
|
||||
}
|
||||
type MenuMaxSortRes struct {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
@@ -20,23 +21,23 @@ type NoticeMaxSortModel struct {
|
||||
Sort int
|
||||
}
|
||||
|
||||
// NoticeEditInp 修改/新增字典数据
|
||||
// NoticeEditInp 修改/新增
|
||||
type NoticeEditInp struct {
|
||||
entity.AdminNotice
|
||||
Receiver string `json:"receiver" description:"接收者"`
|
||||
Reader string `json:"reader" description:"已读人"`
|
||||
Receiver []int64 `json:"receiver" dc:"接收者"`
|
||||
SenderAvatar string `json:"senderAvatar" dc:"发送者头像"`
|
||||
}
|
||||
type NoticeEditModel struct{}
|
||||
|
||||
// NoticeDeleteInp 删除字典类型
|
||||
type NoticeDeleteInp struct {
|
||||
Id interface{}
|
||||
Id interface{} `json:"id" v:"required#公告ID不能为空" dc:"公告ID"`
|
||||
}
|
||||
type NoticeDeleteModel struct{}
|
||||
|
||||
// NoticeViewInp 获取信息
|
||||
type NoticeViewInp struct {
|
||||
Id int64
|
||||
Id int64 `json:"id" v:"required#公告ID不能为空" dc:"公告ID"`
|
||||
}
|
||||
|
||||
type NoticeViewModel struct {
|
||||
@@ -50,11 +51,13 @@ type NoticeListInp struct {
|
||||
form.StatusReq
|
||||
Title string
|
||||
Content string
|
||||
Type int64
|
||||
}
|
||||
|
||||
type NoticeListModel struct {
|
||||
entity.AdminNotice
|
||||
ReceiveNum int `json:"receiveNum"`
|
||||
ReadCount float64 `json:"readCount" dc:"阅读次数"`
|
||||
ReceiverGroup []form.AvatarGroup `json:"receiverGroup" dc:"接收人头像组"`
|
||||
}
|
||||
|
||||
// NoticeStatusInp 更新状态
|
||||
@@ -62,3 +65,66 @@ type NoticeStatusInp struct {
|
||||
entity.AdminNotice
|
||||
}
|
||||
type NoticeStatusModel struct{}
|
||||
|
||||
// NoticeUpReadInp 更新已读
|
||||
type NoticeUpReadInp struct {
|
||||
Id int64 `json:"id" v:"required#公告ID不能为空" dc:"公告ID"`
|
||||
}
|
||||
|
||||
// NoticeReadAllInp 全部已读
|
||||
type NoticeReadAllInp struct {
|
||||
Type int64 `json:"type" v:"required#公告类型不能为空" dc:"公告类型"`
|
||||
}
|
||||
|
||||
// PullMessagesInp 获取列表
|
||||
type PullMessagesInp struct {
|
||||
Limit int `json:"limit" dc:"拉取最大数量限制"`
|
||||
}
|
||||
|
||||
type PullMessagesRow struct {
|
||||
Id int64 `json:"id" dc:"消息ID"`
|
||||
Type int64 `json:"type" dc:"消息类型"`
|
||||
Title string `json:"title" dc:"消息标题"`
|
||||
Content string `json:"content" dc:"消息内容"`
|
||||
Tag int64 `json:"tag" dc:"标签"`
|
||||
Sort int64 `json:"sort" dc:"排序"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"发送人"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
SenderAvatar string `json:"senderAvatar" dc:"发送者头像"`
|
||||
IsRead bool `json:"isRead" dc:"是否已读"`
|
||||
}
|
||||
|
||||
type PullMessagesModel struct {
|
||||
List []*PullMessagesRow `json:"list" dc:"消息列表"`
|
||||
*NoticeUnreadCountModel
|
||||
}
|
||||
|
||||
type NoticeUnreadCountInp struct {
|
||||
MemberId int64
|
||||
MessageIds []int64
|
||||
}
|
||||
|
||||
type NoticeUnreadCountModel struct {
|
||||
NotifyCount int `json:"notifyCount" dc:"未读通知数量"`
|
||||
NoticeCount int `json:"noticeCount" dc:"未读公告数量"`
|
||||
LetterCount int `json:"letterCount" dc:"未读私信数量"`
|
||||
}
|
||||
|
||||
// NoticeMessageListInp 我的消息列表
|
||||
type NoticeMessageListInp struct {
|
||||
form.PageReq
|
||||
Type int64 `json:"type" v:"required#公告类型不能为空" dc:"公告类型"`
|
||||
}
|
||||
|
||||
type NoticeMessageListModel struct {
|
||||
Id int64 `json:"id" dc:"消息ID"`
|
||||
Type int64 `json:"type" dc:"消息类型"`
|
||||
Title string `json:"title" dc:"消息标题"`
|
||||
Content string `json:"content" dc:"消息内容"`
|
||||
Tag int64 `json:"tag" dc:"标签"`
|
||||
Sort int64 `json:"sort" dc:"排序"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"发送人"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
SenderAvatar string `json:"senderAvatar" dc:"发送者头像"`
|
||||
IsRead bool `json:"isRead" dc:"是否已读"`
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ type RoleListInp struct {
|
||||
|
||||
type RoleListModel struct {
|
||||
entity.AdminRole
|
||||
Label string `json:"label" dc:"标签"`
|
||||
Value int64 `json:"value" dc:"键值"`
|
||||
}
|
||||
|
||||
// RoleMemberListInp 查询列表
|
||||
|
||||
@@ -115,3 +115,14 @@ type SelectInt64 struct {
|
||||
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:"头像地址"`
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
// @AutoGenerate Version 2.1.0
|
||||
// @AutoGenerate Date 2023-01-18 15:19:42
|
||||
// @AutoGenerate Version 2.1.2
|
||||
// @AutoGenerate Date 2023-02-08 17:47:32
|
||||
//
|
||||
package sysin
|
||||
|
||||
@@ -32,6 +32,10 @@ type CurdDemoDeleteInp struct {
|
||||
Id interface{} `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
}
|
||||
|
||||
func (in *CurdDemoDeleteInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type CurdDemoDeleteModel struct{}
|
||||
|
||||
// CurdDemoViewInp 获取指定生成演示信息
|
||||
@@ -39,6 +43,10 @@ type CurdDemoViewInp struct {
|
||||
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
}
|
||||
|
||||
func (in *CurdDemoViewInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type CurdDemoViewModel struct {
|
||||
entity.Test
|
||||
}
|
||||
@@ -52,6 +60,10 @@ type CurdDemoListInp struct {
|
||||
TestCategoryName string `json:"testCategoryName" dc:"分类名称"`
|
||||
}
|
||||
|
||||
func (in *CurdDemoListInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type CurdDemoListModel struct {
|
||||
Id int64 `json:"id" dc:"ID"`
|
||||
CategoryId int64 `json:"categoryId" dc:"分类ID"`
|
||||
@@ -63,13 +75,10 @@ type CurdDemoListModel struct {
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"`
|
||||
TestCategoryName string `json:"testCategoryName" dc:"分类名称"`
|
||||
}
|
||||
|
||||
func (in *CurdDemoListInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// CurdDemoExportModel 导出生成演示
|
||||
type CurdDemoExportModel struct {
|
||||
Id int64 `json:"id" dc:"ID"`
|
||||
@@ -81,13 +90,20 @@ type CurdDemoExportModel struct {
|
||||
Switch int `json:"switch" dc:"显示开关"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"创建者"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"`
|
||||
TestCategoryName string `json:"testCategoryName" dc:"分类名称"`
|
||||
}
|
||||
|
||||
// CurdDemoMaxSortInp 获取生成演示最大排序
|
||||
type CurdDemoMaxSortInp struct{}
|
||||
|
||||
func (in *CurdDemoMaxSortInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type CurdDemoMaxSortModel struct {
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
}
|
||||
@@ -98,6 +114,10 @@ type CurdDemoStatusInp struct {
|
||||
Status int `json:"status" dc:"状态"`
|
||||
}
|
||||
|
||||
func (in *CurdDemoStatusInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type CurdDemoStatusModel struct{}
|
||||
|
||||
// CurdDemoSwitchInp 更新生成演示开关状态
|
||||
@@ -106,4 +126,8 @@ type CurdDemoSwitchInp struct {
|
||||
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
}
|
||||
|
||||
func (in *CurdDemoSwitchInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type CurdDemoSwitchModel struct{}
|
||||
|
||||
70
server/internal/model/input/sysin/ems_log.go
Normal file
70
server/internal/model/input/sysin/ems_log.go
Normal file
@@ -0,0 +1,70 @@
|
||||
// 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"
|
||||
)
|
||||
|
||||
// EmsLogEditInp 修改/新增数据
|
||||
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 获取信息
|
||||
type EmsLogViewInp struct {
|
||||
Id int64 `json:"id" v:"required#邮件记录ID不能为空" dc:"邮件记录ID"`
|
||||
}
|
||||
|
||||
type EmsLogViewModel struct {
|
||||
entity.SysEmsLog
|
||||
}
|
||||
|
||||
// EmsLogListInp 获取列表
|
||||
type EmsLogListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
}
|
||||
|
||||
type EmsLogListModel struct {
|
||||
entity.SysEmsLog
|
||||
}
|
||||
|
||||
// EmsLogStatusInp 更新状态
|
||||
type EmsLogStatusInp struct {
|
||||
entity.SysSmsLog
|
||||
}
|
||||
type EmsLogStatusModel struct{}
|
||||
|
||||
// SendEmsInp 发送邮件
|
||||
type SendEmsInp struct {
|
||||
Event string `json:"event" v:"required#邮件事件不能为空" description:"事件"`
|
||||
Email string `json:"email" v:"required#邮箱地址不能为空" description:"邮箱地址"`
|
||||
Code string `json:"code" description:"验证码或短信内容"`
|
||||
Content string `json:"content" description:"邮件内容"`
|
||||
Template string `json:"-" description:"发信模板"`
|
||||
TplData g.Map `json:"-" description:"模板变量"`
|
||||
}
|
||||
|
||||
// VerifyEmsCodeInp 效验验证码
|
||||
type VerifyEmsCodeInp struct {
|
||||
Event string `json:"event" v:"required#邮件事件不能为空" description:"事件"`
|
||||
Email string `json:"email" v:"required#邮箱地址不能为空" description:"邮箱地址"`
|
||||
Code string `json:"code" description:"验证码"`
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
@@ -67,11 +68,11 @@ type GenCodesStatusModel struct{}
|
||||
type GenCodesSelectsInp struct {
|
||||
}
|
||||
type GenCodesSelectsModel struct {
|
||||
GenType form.Selects `json:"genType" dc:"生成类型"`
|
||||
Db form.Selects `json:"db" dc:"数据库选项"`
|
||||
Status form.Selects `json:"status" dc:"生成状态"`
|
||||
LinkMode form.Selects `json:"linkMode" dc:"关联表方式"`
|
||||
BuildMeth form.Selects `json:"buildMeth" dc:"生成方式"`
|
||||
GenType GenTypeSelects `json:"genType" dc:"生成类型"`
|
||||
Db form.Selects `json:"db" dc:"数据库选项"`
|
||||
Status form.Selects `json:"status" dc:"生成状态"`
|
||||
LinkMode form.Selects `json:"linkMode" dc:"关联表方式"`
|
||||
BuildMeth form.Selects `json:"buildMeth" dc:"生成方式"`
|
||||
// 字段表格选项
|
||||
FormMode form.Selects `json:"formMode" dc:"表单组件"`
|
||||
FormRole form.Selects `json:"formRole" dc:"表单验证"`
|
||||
@@ -79,6 +80,25 @@ type GenCodesSelectsModel struct {
|
||||
WhereMode form.Selects `json:"whereMode" dc:"查询条件"`
|
||||
}
|
||||
|
||||
type GenTypeSelects []*GenTypeSelect
|
||||
|
||||
type GenTypeSelect struct {
|
||||
Value int `json:"value"`
|
||||
Label string `json:"label"`
|
||||
Name string `json:"name"`
|
||||
Templates form.Selects `json:"templates"`
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
// GenCodesTableSelectInp 数据库表选项
|
||||
type GenCodesTableSelectInp struct {
|
||||
Name string `json:"name" dc:"数据库配置名称"`
|
||||
|
||||
@@ -30,7 +30,7 @@ type LogListInp struct {
|
||||
|
||||
type LogListModel struct {
|
||||
entity.SysLog
|
||||
MemberName string `json:"member_name"`
|
||||
MemberName string `json:"memberName"`
|
||||
Region string `json:"region"`
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ type LogViewInp struct {
|
||||
|
||||
type LogViewModel struct {
|
||||
entity.SysLog
|
||||
CityLabel string `json:"cityLabel" description:"城市标签"`
|
||||
}
|
||||
|
||||
// LogDeleteInp 删除
|
||||
|
||||
@@ -49,15 +49,15 @@ type LoginLogListModel struct {
|
||||
Status int `json:"status" dc:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"`
|
||||
SysLogId int64 `json:"sysLogId" dc:"日志ID"`
|
||||
SysLogId int64 `json:"sysLogId" dc:"日志ID"`
|
||||
SysLogIp string `json:"sysLogIp" dc:"IP地址"`
|
||||
SysLogProvinceId int64 `json:"sysLogProvinceId" dc:"省编码"`
|
||||
SysLogCityId int64 `json:"sysLogCityId" dc:"市编码"`
|
||||
SysLogErrorCode int `json:"sysLogErrorCode" dc:"报错code"`
|
||||
SysLogUserAgent string `json:"sysLogUserAgent" dc:"UA信息"`
|
||||
Region string `json:"region" dc:"地区"`
|
||||
Os string `json:"os" dc:"系统信息"`
|
||||
Browser string `json:"browser" dc:"浏览器信息"`
|
||||
CityLabel string `json:"cityLabel" dc:"城市标签"`
|
||||
Os string `json:"os" dc:"系统信息"`
|
||||
Browser string `json:"browser" dc:"浏览器信息"`
|
||||
}
|
||||
|
||||
func (in *LoginLogListInp) Filter(ctx context.Context) (err error) {
|
||||
|
||||
@@ -81,3 +81,27 @@ type ProvincesUniqueIdInp struct {
|
||||
type ProvincesUniqueIdModel struct {
|
||||
IsUnique bool `json:"unique" dc:"是否唯一"`
|
||||
}
|
||||
|
||||
type ProvincesSelectInp struct {
|
||||
DataType string `json:"dataType" v:"required#数据类型不能为空" dc:"数据类型"`
|
||||
Value int64 `json:"value" dc:"上级ID"`
|
||||
}
|
||||
|
||||
type ProvincesSelectModel struct {
|
||||
List []*ProvincesSelectData `json:"list" dc:"数据列表"`
|
||||
}
|
||||
|
||||
type ProvincesSelectData struct {
|
||||
Label string `json:"label" description:"地区名称"`
|
||||
Value int64 `json:"value" description:"地区ID"`
|
||||
Level int `json:"level" description:"地区等级"`
|
||||
IsLeaf bool `json:"isLeaf" description:"是否还有下一级"`
|
||||
}
|
||||
|
||||
// ProvincesCityLabelInp 获取指定城市标签
|
||||
type ProvincesCityLabelInp struct {
|
||||
Id int64 `json:"oldId" dc:"城市ID"`
|
||||
Spilt string `json:"spilt" dc:"分隔符"`
|
||||
}
|
||||
|
||||
type ProvincesCityLabelModel string
|
||||
|
||||
Reference in New Issue
Block a user