im 管理后台
This commit is contained in:
@@ -0,0 +1,188 @@
|
||||
// Package model
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package model
|
||||
|
||||
// 后台配置.
|
||||
|
||||
// BasicConfig 基础配置
|
||||
type BasicConfig struct {
|
||||
CaptchaSwitch int `json:"basicCaptchaSwitch"`
|
||||
CloseText string `json:"basicCloseText"`
|
||||
Copyright string `json:"basicCopyright"`
|
||||
IcpCode string `json:"basicIcpCode"`
|
||||
Logo string `json:"basicLogo"`
|
||||
Name string `json:"basicName"`
|
||||
Domain string `json:"basicDomain"`
|
||||
WsAddr string `json:"basicWsAddr"`
|
||||
RegisterSwitch int `json:"basicRegisterSwitch"`
|
||||
SystemOpen bool `json:"basicSystemOpen"`
|
||||
}
|
||||
|
||||
// EmailTemplate 邮件模板
|
||||
type EmailTemplate struct {
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// EmailConfig 邮箱配置
|
||||
type EmailConfig struct {
|
||||
User string `json:"smtpUser"`
|
||||
Password string `json:"smtpPass"`
|
||||
Addr string `json:"smtpAddr"`
|
||||
Host string `json:"smtpHost"`
|
||||
Port int64 `json:"smtpPort"`
|
||||
SendName string `json:"smtpSendName"`
|
||||
AdminMailbox string `json:"smtpAdminMailbox"`
|
||||
MinInterval int `json:"smtpMinInterval"`
|
||||
MaxIpLimit int `json:"smtpMaxIpLimit"`
|
||||
CodeExpire int `json:"smtpCodeExpire"`
|
||||
Template []*EmailTemplate `json:"smtpTemplate"`
|
||||
}
|
||||
|
||||
// CashConfig 提现配置
|
||||
type CashConfig struct {
|
||||
Switch bool `json:"cashSwitch"`
|
||||
MinFee float64 `json:"cashMinFee"`
|
||||
MinFeeRatio float64 `json:"cashMinFeeRatio"`
|
||||
MinMoney float64 `json:"cashMinMoney"`
|
||||
Tips string `json:"cashTips"`
|
||||
}
|
||||
|
||||
// UploadConfig 上传配置
|
||||
type UploadConfig struct {
|
||||
// 通用配置
|
||||
Drive string `json:"uploadDrive"`
|
||||
FileSize int64 `json:"uploadFileSize"`
|
||||
FileType string `json:"uploadFileType"`
|
||||
ImageSize int64 `json:"uploadImageSize"`
|
||||
ImageType string `json:"uploadImageType"`
|
||||
// 本地存储配置
|
||||
LocalPath string `json:"uploadLocalPath"`
|
||||
// UCloud对象存储配置
|
||||
UCloudBucketHost string `json:"uploadUCloudBucketHost"`
|
||||
UCloudBucketName string `json:"uploadUCloudBucketName"`
|
||||
UCloudEndpoint string `json:"uploadUCloudEndpoint"`
|
||||
UCloudFileHost string `json:"uploadUCloudFileHost"`
|
||||
UCloudPath string `json:"uploadUCloudPath"`
|
||||
UCloudPrivateKey string `json:"uploadUCloudPrivateKey"`
|
||||
UCloudPublicKey string `json:"uploadUCloudPublicKey"`
|
||||
// 腾讯云cos配置
|
||||
CosSecretId string `json:"uploadCosSecretId"`
|
||||
CosSecretKey string `json:"uploadCosSecretKey"`
|
||||
CosBucketURL string `json:"uploadCosBucketURL"`
|
||||
CosPath string `json:"uploadCosPath"`
|
||||
// 阿里云oss配置
|
||||
OssSecretId string `json:"uploadOssSecretId"`
|
||||
OssSecretKey string `json:"uploadOssSecretKey"`
|
||||
OssEndpoint string `json:"uploadOssEndpoint"`
|
||||
OssBucketURL string `json:"uploadOssBucketURL"`
|
||||
OssPath string `json:"uploadOssPath"`
|
||||
OssBucket string `json:"uploadOssBucket"`
|
||||
// 七牛云对象存储配置
|
||||
QiNiuAccessKey string `json:"uploadQiNiuAccessKey"`
|
||||
QiNiuSecretKey string `json:"uploadQiNiuSecretKey"`
|
||||
QiNiuDomain string `json:"uploadQiNiuDomain"`
|
||||
QiNiuPath string `json:"uploadQiNiuPath"`
|
||||
QiNiuBucket string `json:"uploadQiNiuBucket"`
|
||||
// minio配置
|
||||
MinioAccessKey string `json:"uploadMinioAccessKey"`
|
||||
MinioSecretKey string `json:"uploadMinioSecretKey"`
|
||||
MinioEndpoint string `json:"uploadMinioEndpoint"`
|
||||
MinioUseSSL int `json:"uploadMinioUseSSL"`
|
||||
MinioPath string `json:"uploadMinioPath"`
|
||||
MinioBucket string `json:"uploadMinioBucket"`
|
||||
MinioDomain string `json:"uploadMinioDomain"`
|
||||
}
|
||||
|
||||
// GeoConfig 地理配置
|
||||
type GeoConfig struct {
|
||||
GeoAmapWebKey string `json:"geoAmapWebKey"`
|
||||
}
|
||||
|
||||
// SmsTemplate 短信模板
|
||||
type SmsTemplate struct {
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// SmsConfig 短信配置
|
||||
type SmsConfig struct {
|
||||
// 基础
|
||||
SmsDrive string `json:"smsDrive"`
|
||||
SmsMinInterval int `json:"smsMinInterval"`
|
||||
SmsMaxIpLimit int `json:"smsMaxIpLimit"`
|
||||
SmsCodeExpire int `json:"smsCodeExpire"`
|
||||
// 阿里云
|
||||
AliYunAccessKeyID string `json:"smsAliYunAccessKeyID"`
|
||||
AliYunAccessKeySecret string `json:"smsAliYunAccessKeySecret"`
|
||||
AliYunSign string `json:"smsAliYunSign"`
|
||||
AliYunTemplate []*SmsTemplate `json:"smsAliYunTemplate"`
|
||||
// 腾讯云
|
||||
TencentSecretId string `json:"smsTencentSecretId"`
|
||||
TencentSecretKey string `json:"smsTencentSecretKey"`
|
||||
TencentEndpoint string `json:"smsTencentEndpoint"`
|
||||
TencentRegion string `json:"smsTencentRegion"`
|
||||
TencentAppId string `json:"smsTencentAppId"`
|
||||
TencentSign string `json:"smsTencentSign"`
|
||||
TencentTemplate []*SmsTemplate `json:"smsTencentTemplate"`
|
||||
}
|
||||
|
||||
type PayConfig struct {
|
||||
Debug bool `json:"payDebug"`
|
||||
// 支付宝
|
||||
AliPayAppId string `json:"payAliPayAppId"`
|
||||
AliPayPrivateKey string `json:"payAliPayPrivateKey"`
|
||||
AliPayAppCertPublicKey string `json:"payAliPayAppCertPublicKey"`
|
||||
AliPayRootCert string `json:"payAliPayRootCert"`
|
||||
AliPayCertPublicKeyRSA2 string `json:"payAliPayCertPublicKeyRSA2"`
|
||||
// 微信支付
|
||||
WxPayAppId string `json:"payWxPayAppId"`
|
||||
WxPayMchId string `json:"payWxPayMchId"`
|
||||
WxPaySerialNo string `json:"payWxPaySerialNo"`
|
||||
WxPayAPIv3Key string `json:"payWxPayAPIv3Key"`
|
||||
WxPayPrivateKey string `json:"payWxPayPrivateKey"`
|
||||
// QQ支付
|
||||
QQPayAppId string `json:"payQQPayAppId"`
|
||||
QQPayMchId string `json:"payQQPayMchId"`
|
||||
QQPayApiKey string `json:"payQQPayApiKey"`
|
||||
}
|
||||
|
||||
// WechatOfficialAccountConfig 微信公众号配置
|
||||
type WechatOfficialAccountConfig struct {
|
||||
OfficialAppID string `json:"officialAccountAppId"` // appid
|
||||
OfficialAppSecret string `json:"officialAccountAppSecret"` // app secret
|
||||
OfficialToken string `json:"officialAccountToken"` // token
|
||||
OfficialEncodingAESKey string `json:"officialAccountEncodingAESKey"` // EncodingAESKey
|
||||
}
|
||||
|
||||
// WechatOpenPlatformConfig 微信开放平台配置
|
||||
type WechatOpenPlatformConfig struct {
|
||||
OpenAppID string `json:"openPlatformAppId"` // appid
|
||||
OpenAppSecret string `json:"openPlatformAppSecret"` // app secret
|
||||
OpenToken string `json:"openPlatformToken"` // token
|
||||
OpenEncodingAESKey string `json:"openPlatformEncodingAESKey"` // EncodingAESKey
|
||||
}
|
||||
|
||||
// WechatConfig 微信配置
|
||||
type WechatConfig struct {
|
||||
*WechatOfficialAccountConfig
|
||||
*WechatOpenPlatformConfig
|
||||
}
|
||||
|
||||
// LoginConfig 登录配置
|
||||
type LoginConfig struct {
|
||||
RegisterSwitch int `json:"loginRegisterSwitch"`
|
||||
CaptchaSwitch int `json:"loginCaptchaSwitch"`
|
||||
CaptchaType int `json:"loginCaptchaType"`
|
||||
Avatar string `json:"loginAvatar"`
|
||||
RoleId int64 `json:"loginRoleId"`
|
||||
DeptId int64 `json:"loginDeptId"`
|
||||
PostIds []int64 `json:"loginPostIds"`
|
||||
Protocol string `json:"loginProtocol"`
|
||||
Policy string `json:"loginPolicy"`
|
||||
AutoOpenId int `json:"loginAutoOpenId"`
|
||||
ForceInvite int `json:"loginForceInvite"`
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
// Package model
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package model
|
||||
|
||||
// 本地配置.
|
||||
|
||||
// LogConfig 日志配置
|
||||
type LogConfig struct {
|
||||
Switch bool `json:"switch"`
|
||||
Queue bool `json:"queue"`
|
||||
Module []string `json:"module"`
|
||||
SkipCode []string `json:"skipCode"`
|
||||
}
|
||||
|
||||
// ServeLogConfig 服务日志配置
|
||||
type ServeLogConfig struct {
|
||||
Switch bool `json:"switch"`
|
||||
Queue bool `json:"queue"`
|
||||
LevelFormat []string `json:"levelFormat"`
|
||||
}
|
||||
|
||||
// GenerateAppCrudTemplate curd模板
|
||||
type GenerateAppCrudTemplate struct {
|
||||
Group string `json:"group"`
|
||||
IsAddon bool `json:"isAddon"`
|
||||
MasterPackage string `json:"masterPackage"`
|
||||
TemplatePath string `json:"templatePath"`
|
||||
ApiPath string `json:"apiPath"`
|
||||
InputPath string `json:"inputPath"`
|
||||
ControllerPath string `json:"controllerPath"`
|
||||
LogicPath string `json:"logicPath"`
|
||||
RouterPath string `json:"routerPath"`
|
||||
SqlPath string `json:"sqlPath"`
|
||||
WebApiPath string `json:"webApiPath"`
|
||||
WebViewsPath string `json:"webViewsPath"`
|
||||
}
|
||||
|
||||
// GenerateAppQueueTemplate 消息队列模板
|
||||
type GenerateAppQueueTemplate struct {
|
||||
Group string `json:"group"`
|
||||
TemplatePath string `json:"templatePath"`
|
||||
}
|
||||
|
||||
// GenerateAppTreeTemplate 关系树列表模板
|
||||
type GenerateAppTreeTemplate struct {
|
||||
Group string `json:"group"`
|
||||
TemplatePath string `json:"templatePath"`
|
||||
}
|
||||
|
||||
// GenerateConfig 生成代码配置
|
||||
type GenerateConfig struct {
|
||||
AllowedIPs []string `json:"allowedIPs"`
|
||||
Application struct {
|
||||
Crud struct {
|
||||
Templates []*GenerateAppCrudTemplate `json:"templates"`
|
||||
} `json:"crud"`
|
||||
Queue struct {
|
||||
Templates []*GenerateAppQueueTemplate `json:"templates"`
|
||||
} `json:"queue"`
|
||||
Tree struct {
|
||||
Templates []*GenerateAppTreeTemplate `json:"templates"`
|
||||
} `json:"tree"`
|
||||
} `json:"application"`
|
||||
Delimiters []string `json:"delimiters"`
|
||||
DevPath string `json:"devPath"`
|
||||
DisableTables []string `json:"disableTables"`
|
||||
SelectDbs []string `json:"selectDbs"`
|
||||
Addon *BuildAddonConfig `json:"addon"`
|
||||
}
|
||||
|
||||
// BuildAddonConfig 构建插件模块配置
|
||||
type BuildAddonConfig struct {
|
||||
SrcPath string `json:"srcPath"`
|
||||
WebApiPath string `json:"webApiPath"`
|
||||
WebViewsPath string `json:"webViewsPath"`
|
||||
}
|
||||
|
||||
// TCPServerConfig tcp服务器配置
|
||||
type TCPServerConfig struct {
|
||||
Address string `json:"address"`
|
||||
}
|
||||
|
||||
// TCPClientConfig tcp客户端配置
|
||||
type TCPClientConfig struct {
|
||||
Cron *TCPClientConnConfig `json:"cron"`
|
||||
Auth *TCPClientConnConfig `json:"auth"`
|
||||
}
|
||||
|
||||
// TCPClientConnConfig tcp客户端认证
|
||||
type TCPClientConnConfig struct {
|
||||
Group string `json:"group"`
|
||||
Name string `json:"name"`
|
||||
Address string `json:"address"`
|
||||
AppId string `json:"appId"`
|
||||
SecretKey string `json:"secretKey"`
|
||||
}
|
||||
|
||||
// TCPConfig tcp服务器配置
|
||||
type TCPConfig struct {
|
||||
Server *TCPServerConfig `json:"server"`
|
||||
Client *TCPClientConfig `json:"client"`
|
||||
}
|
||||
|
||||
// TokenConfig 登录令牌配置
|
||||
type TokenConfig struct {
|
||||
SecretKey string `json:"secretKey"`
|
||||
Expires int64 `json:"expires"`
|
||||
AutoRefresh bool `json:"autoRefresh"`
|
||||
RefreshInterval int64 `json:"refreshInterval"`
|
||||
MaxRefreshTimes int64 `json:"maxRefreshTimes"`
|
||||
MultiLogin bool `json:"multiLogin"`
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// Package model
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Context 请求上下文结构
|
||||
type Context struct {
|
||||
Module string // 应用模块 admin|api|home|websocket
|
||||
AddonName string // 插件名称 如果不是插件模块请求,可能为空
|
||||
User *Identity // 上下文用户信息
|
||||
Response *Response // 请求响应
|
||||
Data g.Map // 自定kv变量 业务模块根据需要设置,不固定
|
||||
}
|
||||
|
||||
// Identity 通用身份模型
|
||||
type Identity struct {
|
||||
Id int64 `json:"id" description:"用户ID"`
|
||||
Pid int64 `json:"pid" description:"上级ID"`
|
||||
DeptId int64 `json:"deptId" description:"部门ID"`
|
||||
DeptType string `json:"deptType" description:"部门类型"`
|
||||
RoleId int64 `json:"roleId" description:"角色ID"`
|
||||
RoleKey string `json:"roleKey" description:"角色唯一标识符"`
|
||||
Username string `json:"username" description:"用户名"`
|
||||
RealName string `json:"realName" description:"姓名"`
|
||||
Avatar string `json:"avatar" description:"头像"`
|
||||
Email string `json:"email" description:"邮箱"`
|
||||
Mobile string `json:"mobile" description:"手机号码"`
|
||||
App string `json:"app" description:"登录应用"`
|
||||
LoginAt *gtime.Time `json:"loginAt" description:"登录时间"`
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// Package model
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package model
|
||||
|
||||
// Option 字典数据选项
|
||||
type Option struct {
|
||||
Key interface{} `json:"key"`
|
||||
Label string `json:"label" description:"字典标签"`
|
||||
Value interface{} `json:"value" description:"字典键值"`
|
||||
ValueType string `json:"valueType" description:"键值数据类型"`
|
||||
Type string `json:"type" description:"字典类型"`
|
||||
ListClass string `json:"listClass" description:"表格回显样式"`
|
||||
Extra interface{} `json:"extra" description:"额外数据配置"`
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AddonHgexampleTable is the golang structure of table hg_addon_hgexample_table for DAO operations like Where/Data.
|
||||
type AddonHgexampleTable struct {
|
||||
g.Meta `orm:"table:hg_addon_hgexample_table, do:true"`
|
||||
Id any // ID
|
||||
Pid any // 上级ID
|
||||
Level any // 树等级
|
||||
Tree any // 关系树
|
||||
CategoryId any // 分类ID
|
||||
Flag *gjson.Json // 标签
|
||||
Title any // 标题
|
||||
Description any // 描述
|
||||
Content any // 内容
|
||||
Image any // 单图
|
||||
Images *gjson.Json // 多图
|
||||
Attachfile any // 附件
|
||||
Attachfiles *gjson.Json // 多附件
|
||||
Map *gjson.Json // 动态键值对
|
||||
Star any // 推荐星
|
||||
Price any // 价格
|
||||
Views any // 浏览次数
|
||||
ActivityAt *gtime.Time // 活动时间
|
||||
StartAt *gtime.Time // 开启时间
|
||||
EndAt *gtime.Time // 结束时间
|
||||
Switch any // 开关
|
||||
Sort any // 排序
|
||||
Avatar any // 头像
|
||||
Sex any // 性别
|
||||
Qq any // qq
|
||||
Email any // 邮箱
|
||||
Mobile any // 手机号码
|
||||
Hobby *gjson.Json // 爱好
|
||||
Channel any // 渠道
|
||||
CityId any // 所在城市
|
||||
Remark any // 备注
|
||||
Status any // 状态
|
||||
CreatedBy any // 创建者
|
||||
UpdatedBy any // 更新者
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
DeletedAt *gtime.Time // 删除时间
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AddonHgexampleTenantOrder is the golang structure of table hg_addon_hgexample_tenant_order for DAO operations like Where/Data.
|
||||
type AddonHgexampleTenantOrder struct {
|
||||
g.Meta `orm:"table:hg_addon_hgexample_tenant_order, do:true"`
|
||||
Id any // 主键
|
||||
TenantId any // 租户ID
|
||||
MerchantId any // 商户ID
|
||||
UserId any // 用户ID
|
||||
ProductName any // 购买产品
|
||||
OrderSn any // 订单号
|
||||
Money any // 充值金额
|
||||
Remark any // 备注
|
||||
Status any // 订单状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminCash is the golang structure of table hg_admin_cash for DAO operations like Where/Data.
|
||||
type AdminCash struct {
|
||||
g.Meta `orm:"table:hg_admin_cash, do:true"`
|
||||
Id any // ID
|
||||
MemberId any // 管理员ID
|
||||
Money any // 提现金额
|
||||
Fee any // 手续费
|
||||
LastMoney any // 最终到账金额
|
||||
Ip any // 申请人IP
|
||||
Status any // 状态码
|
||||
Msg any // 处理结果
|
||||
HandleAt *gtime.Time // 处理时间
|
||||
CreatedAt *gtime.Time // 申请时间
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminCreditsLog is the golang structure of table hg_admin_credits_log for DAO operations like Where/Data.
|
||||
type AdminCreditsLog struct {
|
||||
g.Meta `orm:"table:hg_admin_credits_log, do:true"`
|
||||
Id any // 变动ID
|
||||
MemberId any // 管理员ID
|
||||
AppId any // 应用id
|
||||
AddonsName any // 插件名称
|
||||
CreditType any // 变动类型
|
||||
CreditGroup any // 变动组别
|
||||
BeforeNum any // 变动前
|
||||
Num any // 变动数据
|
||||
AfterNum any // 变动后
|
||||
Remark any // 备注
|
||||
Ip any // 操作人IP
|
||||
MapId any // 关联ID
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminDept is the golang structure of table hg_admin_dept for DAO operations like Where/Data.
|
||||
type AdminDept struct {
|
||||
g.Meta `orm:"table:hg_admin_dept, do:true"`
|
||||
Id any // 部门ID
|
||||
Pid any // 父部门ID
|
||||
Name any // 部门名称
|
||||
Code any // 部门编码
|
||||
Type any // 部门类型
|
||||
Leader any // 负责人
|
||||
Phone any // 联系电话
|
||||
Email any // 邮箱
|
||||
Level any // 关系树等级
|
||||
Tree any // 关系树
|
||||
Sort any // 排序
|
||||
Status any // 部门状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminMember is the golang structure of table hg_admin_member for DAO operations like Where/Data.
|
||||
type AdminMember struct {
|
||||
g.Meta `orm:"table:hg_admin_member, do:true"`
|
||||
Id any // 管理员ID
|
||||
DeptId any // 部门ID
|
||||
RoleId any // 角色ID
|
||||
RealName any // 真实姓名
|
||||
Username any // 帐号
|
||||
PasswordHash any // 密码
|
||||
Salt any // 密码盐
|
||||
PasswordResetToken any // 密码重置令牌
|
||||
Integral any // 积分
|
||||
Balance any // 余额
|
||||
Avatar any // 头像
|
||||
Sex any // 性别
|
||||
Qq any // qq
|
||||
Email any // 邮箱
|
||||
Mobile any // 手机号码
|
||||
Birthday *gtime.Time // 生日
|
||||
CityId any // 城市编码
|
||||
Address any // 联系地址
|
||||
Pid any // 上级管理员ID
|
||||
Level any // 关系树等级
|
||||
Tree any // 关系树
|
||||
InviteCode any // 邀请码
|
||||
Cash *gjson.Json // 提现配置
|
||||
LastActiveAt *gtime.Time // 最后活跃时间
|
||||
Remark any // 备注
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AdminMemberPost is the golang structure of table hg_admin_member_post for DAO operations like Where/Data.
|
||||
type AdminMemberPost struct {
|
||||
g.Meta `orm:"table:hg_admin_member_post, do:true"`
|
||||
MemberId any // 管理员ID
|
||||
PostId any // 岗位ID
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AdminMemberRole is the golang structure of table hg_admin_member_role for DAO operations like Where/Data.
|
||||
type AdminMemberRole struct {
|
||||
g.Meta `orm:"table:hg_admin_member_role, do:true"`
|
||||
MemberId any // 管理员ID
|
||||
RoleId any // 角色ID
|
||||
}
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminMenu is the golang structure of table hg_admin_menu for DAO operations like Where/Data.
|
||||
type AdminMenu struct {
|
||||
g.Meta `orm:"table:hg_admin_menu, do:true"`
|
||||
Id any // 菜单ID
|
||||
Pid any // 父菜单ID
|
||||
Level any // 关系树等级
|
||||
Tree any // 关系树
|
||||
Title any // 菜单名称
|
||||
Name any // 名称编码
|
||||
Path any // 路由地址
|
||||
Icon any // 菜单图标
|
||||
Type any // 菜单类型(1目录 2菜单 3按钮)
|
||||
Redirect any // 重定向地址
|
||||
Permissions any // 菜单包含权限集合
|
||||
PermissionName any // 权限名称
|
||||
Component any // 组件路径
|
||||
AlwaysShow any // 取消自动计算根路由模式
|
||||
ActiveMenu any // 高亮菜单编码
|
||||
IsRoot any // 是否跟路由
|
||||
IsFrame any // 是否内嵌
|
||||
FrameSrc any // 内联外部地址
|
||||
KeepAlive any // 缓存该路由
|
||||
Hidden any // 是否隐藏
|
||||
Affix any // 是否固定
|
||||
Sort any // 排序
|
||||
Remark any // 备注
|
||||
Status any // 菜单状态
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
}
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminNotice is the golang structure of table hg_admin_notice for DAO operations like Where/Data.
|
||||
type AdminNotice struct {
|
||||
g.Meta `orm:"table:hg_admin_notice, do:true"`
|
||||
Id any // 公告ID
|
||||
Title any // 公告标题
|
||||
Type any // 公告类型
|
||||
Tag any // 标签
|
||||
Content any // 公告内容
|
||||
Receiver *gjson.Json // 接收者
|
||||
Remark any // 备注
|
||||
Sort any // 排序
|
||||
Status any // 公告状态
|
||||
CreatedBy any // 发送人
|
||||
UpdatedBy any // 修改人
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 删除时间
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminNoticeRead is the golang structure of table hg_admin_notice_read for DAO operations like Where/Data.
|
||||
type AdminNoticeRead struct {
|
||||
g.Meta `orm:"table:hg_admin_notice_read, do:true"`
|
||||
Id any // 记录ID
|
||||
NoticeId any // 公告ID
|
||||
MemberId any // 会员ID
|
||||
Clicks any // 已读次数
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
CreatedAt *gtime.Time // 阅读时间
|
||||
}
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminOauth is the golang structure of table hg_admin_oauth for DAO operations like Where/Data.
|
||||
type AdminOauth struct {
|
||||
g.Meta `orm:"table:hg_admin_oauth, do:true"`
|
||||
Id any // 主键
|
||||
MemberId any // 用户ID
|
||||
Unionid any // 唯一ID
|
||||
OauthClient any // 授权组别
|
||||
OauthOpenid any // 授权开放ID
|
||||
Sex any // 性别
|
||||
Nickname any // 昵称
|
||||
HeadPortrait any // 头像
|
||||
Birthday *gtime.Time // 生日
|
||||
Country any // 国家
|
||||
Province any // 省
|
||||
City any // 市
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminOrder is the golang structure of table hg_admin_order for DAO operations like Where/Data.
|
||||
type AdminOrder struct {
|
||||
g.Meta `orm:"table:hg_admin_order, do:true"`
|
||||
Id any // 主键
|
||||
MemberId any // 管理员id
|
||||
OrderType any // 订单类型
|
||||
ProductId any // 产品id
|
||||
OrderSn any // 关联订单号
|
||||
Money any // 充值金额
|
||||
Remark any // 备注
|
||||
RefundReason any // 退款原因
|
||||
RejectRefundReason any // 拒绝退款原因
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminPost is the golang structure of table hg_admin_post for DAO operations like Where/Data.
|
||||
type AdminPost struct {
|
||||
g.Meta `orm:"table:hg_admin_post, do:true"`
|
||||
Id any // 岗位ID
|
||||
Code any // 岗位编码
|
||||
Name any // 岗位名称
|
||||
Remark any // 备注
|
||||
Sort any // 排序
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminRole is the golang structure of table hg_admin_role for DAO operations like Where/Data.
|
||||
type AdminRole struct {
|
||||
g.Meta `orm:"table:hg_admin_role, do:true"`
|
||||
Id any // 角色ID
|
||||
Name any // 角色名称
|
||||
Key any // 角色权限字符串
|
||||
DataScope any // 数据范围
|
||||
CustomDept *gjson.Json // 自定义部门权限
|
||||
Pid any // 上级角色ID
|
||||
Level any // 关系树等级
|
||||
Tree any // 关系树
|
||||
Remark any // 备注
|
||||
Sort any // 排序
|
||||
Status any // 角色状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AdminRoleCasbin is the golang structure of table hg_admin_role_casbin for DAO operations like Where/Data.
|
||||
type AdminRoleCasbin struct {
|
||||
g.Meta `orm:"table:hg_admin_role_casbin, do:true"`
|
||||
Id any //
|
||||
PType any //
|
||||
V0 any //
|
||||
V1 any //
|
||||
V2 any //
|
||||
V3 any //
|
||||
V4 any //
|
||||
V5 any //
|
||||
}
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AdminRoleMenu is the golang structure of table hg_admin_role_menu for DAO operations like Where/Data.
|
||||
type AdminRoleMenu struct {
|
||||
g.Meta `orm:"table:hg_admin_role_menu, do:true"`
|
||||
RoleId any // 角色ID
|
||||
MenuId any // 菜单ID
|
||||
}
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// PayLog is the golang structure of table hg_pay_log for DAO operations like Where/Data.
|
||||
type PayLog struct {
|
||||
g.Meta `orm:"table:hg_pay_log, do:true"`
|
||||
Id any // 主键
|
||||
MemberId any // 会员ID
|
||||
AppId any // 应用ID
|
||||
AddonsName any // 插件名称
|
||||
OrderSn any // 关联订单号
|
||||
OrderGroup any // 组别[默认统一支付类型]
|
||||
Openid any // openid
|
||||
MchId any // 商户支付账户
|
||||
Subject any // 订单标题
|
||||
Detail *gjson.Json // 支付商品详情
|
||||
AuthCode any // 刷卡码
|
||||
OutTradeNo any // 商户订单号
|
||||
TransactionId any // 交易号
|
||||
PayType any // 支付类型
|
||||
PayAmount any // 支付金额
|
||||
ActualAmount any // 实付金额
|
||||
PayStatus any // 支付状态
|
||||
PayAt *gtime.Time // 支付时间
|
||||
TradeType any // 交易类型
|
||||
RefundSn any // 退款单号
|
||||
IsRefund any // 是否退款
|
||||
Custom any // 自定义参数
|
||||
CreateIp any // 创建者IP
|
||||
PayIp any // 支付者IP
|
||||
NotifyUrl any // 支付通知回调地址
|
||||
ReturnUrl any // 买家付款成功跳转地址
|
||||
TraceIds *gjson.Json // 链路ID集合
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// PayRefund is the golang structure of table hg_pay_refund for DAO operations like Where/Data.
|
||||
type PayRefund struct {
|
||||
g.Meta `orm:"table:hg_pay_refund, do:true"`
|
||||
Id any // 主键ID
|
||||
MemberId any // 会员ID
|
||||
AppId any // 应用ID
|
||||
OrderSn any // 业务订单号
|
||||
RefundTradeNo any // 退款交易号
|
||||
RefundMoney any // 退款金额
|
||||
RefundWay any // 退款方式
|
||||
Ip any // 申请者IP
|
||||
Reason any // 申请退款原因
|
||||
Remark any // 退款备注
|
||||
Status any // 退款状态
|
||||
CreatedAt *gtime.Time // 申请时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysAddonsConfig is the golang structure of table hg_sys_addons_config for DAO operations like Where/Data.
|
||||
type SysAddonsConfig struct {
|
||||
g.Meta `orm:"table:hg_sys_addons_config, do:true"`
|
||||
Id any // 配置ID
|
||||
AddonName any // 插件名称
|
||||
Group any // 分组
|
||||
Name any // 参数名称
|
||||
Type any // 键值类型:string,int,uint,bool,TIMESTAMP,date
|
||||
Key any // 参数键名
|
||||
Value any // 参数键值
|
||||
DefaultValue any // 默认值
|
||||
Sort any // 排序
|
||||
Tip any // 变量描述
|
||||
IsDefault any // 是否为系统默认
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysAddonsInstall is the golang structure of table hg_sys_addons_install for DAO operations like Where/Data.
|
||||
type SysAddonsInstall struct {
|
||||
g.Meta `orm:"table:hg_sys_addons_install, do:true"`
|
||||
Id interface{} // 主键
|
||||
Name interface{} // 插件名称
|
||||
Version interface{} // 版本号
|
||||
Status interface{} // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysAttachment is the golang structure of table hg_sys_attachment for DAO operations like Where/Data.
|
||||
type SysAttachment struct {
|
||||
g.Meta `orm:"table:hg_sys_attachment, do:true"`
|
||||
Id any // 文件ID
|
||||
AppId any // 应用ID
|
||||
MemberId any // 管理员ID
|
||||
CateId any // 上传分类
|
||||
Drive any // 上传驱动
|
||||
Name any // 文件原始名
|
||||
Kind any // 上传类型
|
||||
MimeType any // 扩展类型
|
||||
NaiveType any // NaiveUI类型
|
||||
Path any // 本地路径
|
||||
FileUrl any // url
|
||||
Size any // 文件大小
|
||||
Ext any // 扩展名
|
||||
Md5 any // md5校验码
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysBlacklist is the golang structure of table hg_sys_blacklist for DAO operations like Where/Data.
|
||||
type SysBlacklist struct {
|
||||
g.Meta `orm:"table:hg_sys_blacklist, do:true"`
|
||||
Id any // 黑名单ID
|
||||
Ip any // IP地址
|
||||
Remark any // 备注
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysConfig is the golang structure of table hg_sys_config for DAO operations like Where/Data.
|
||||
type SysConfig struct {
|
||||
g.Meta `orm:"table:hg_sys_config, do:true"`
|
||||
Id any // 配置ID
|
||||
Group any // 配置分组
|
||||
Name any // 参数名称
|
||||
Type any // 键值类型:string,int,uint,bool,TIMESTAMP,date
|
||||
Key any // 参数键名
|
||||
Value any // 参数键值
|
||||
DefaultValue any // 默认值
|
||||
Sort any // 排序
|
||||
Tip any // 变量描述
|
||||
IsDefault any // 是否为系统默认
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysCron is the golang structure of table hg_sys_cron for DAO operations like Where/Data.
|
||||
type SysCron struct {
|
||||
g.Meta `orm:"table:hg_sys_cron, do:true"`
|
||||
Id any // 任务ID
|
||||
GroupId any // 分组ID
|
||||
Title any // 任务标题
|
||||
Name any // 任务方法
|
||||
Params any // 函数参数
|
||||
Pattern any // 表达式
|
||||
Policy any // 策略
|
||||
Count any // 执行次数
|
||||
Sort any // 排序
|
||||
Remark any // 备注
|
||||
Status any // 任务状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysCronGroup is the golang structure of table hg_sys_cron_group for DAO operations like Where/Data.
|
||||
type SysCronGroup struct {
|
||||
g.Meta `orm:"table:hg_sys_cron_group, do:true"`
|
||||
Id any // 任务分组ID
|
||||
Pid any // 父类任务分组ID
|
||||
Name any // 分组名称
|
||||
IsDefault any // 是否默认
|
||||
Sort any // 排序
|
||||
Remark any // 备注
|
||||
Status any // 分组状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysDictData is the golang structure of table hg_sys_dict_data for DAO operations like Where/Data.
|
||||
type SysDictData struct {
|
||||
g.Meta `orm:"table:hg_sys_dict_data, do:true"`
|
||||
Id any // 字典数据ID
|
||||
Label any // 字典标签
|
||||
Value any // 字典键值
|
||||
ValueType any // 键值数据类型:string,int,uint,bool,TIMESTAMP,date
|
||||
Type any // 字典类型
|
||||
ListClass any // 表格回显样式
|
||||
IsDefault any // 是否为系统默认
|
||||
Sort any // 字典排序
|
||||
Remark any // 备注
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysDictType is the golang structure of table hg_sys_dict_type for DAO operations like Where/Data.
|
||||
type SysDictType struct {
|
||||
g.Meta `orm:"table:hg_sys_dict_type, do:true"`
|
||||
Id any // 字典类型ID
|
||||
Pid any // 父类字典类型ID
|
||||
Name any // 字典类型名称
|
||||
Type any // 字典类型
|
||||
Sort any // 排序
|
||||
Remark any // 备注
|
||||
Status any // 字典类型状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysEmsLog is the golang structure of table hg_sys_ems_log for DAO operations like Where/Data.
|
||||
type SysEmsLog struct {
|
||||
g.Meta `orm:"table:hg_sys_ems_log, do:true"`
|
||||
Id any // 主键
|
||||
Event any // 事件
|
||||
Email any // 邮箱地址,多个用;隔开
|
||||
Code any // 验证码
|
||||
Times any // 验证次数
|
||||
Content any // 邮件内容
|
||||
Ip any // ip地址
|
||||
Status any // 状态(1未验证,2已验证)
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysGenCodes is the golang structure of table hg_sys_gen_codes for DAO operations like Where/Data.
|
||||
type SysGenCodes struct {
|
||||
g.Meta `orm:"table:hg_sys_gen_codes, do:true"`
|
||||
Id any // 生成ID
|
||||
GenType any // 生成类型
|
||||
GenTemplate any // 生成模板
|
||||
VarName any // 实体命名
|
||||
Options *gjson.Json // 配置选项
|
||||
DbName any // 数据库名称
|
||||
TableName any // 主表名称
|
||||
TableComment any // 主表注释
|
||||
DaoName any // 主表dao模型
|
||||
MasterColumns *gjson.Json // 主表字段
|
||||
AddonName any // 插件名称
|
||||
Status any // 生成状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysGenCurdDemo is the golang structure of table hg_sys_gen_curd_demo for DAO operations like Where/Data.
|
||||
type SysGenCurdDemo struct {
|
||||
g.Meta `orm:"table:hg_sys_gen_curd_demo, do:true"`
|
||||
Id any // ID
|
||||
CategoryId any // 分类ID
|
||||
Title any // 标题
|
||||
Description any // 描述
|
||||
Content any // 内容
|
||||
Image any // 单图
|
||||
Attachfile any // 附件
|
||||
CityId any // 所在城市
|
||||
Switch any // 显示开关
|
||||
Sort any // 排序
|
||||
Status any // 状态
|
||||
CreatedBy any // 创建者
|
||||
UpdatedBy any // 更新者
|
||||
DeletedBy any // 删除者
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
DeletedAt *gtime.Time // 删除时间
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysGenTreeDemo is the golang structure of table hg_sys_gen_tree_demo for DAO operations like Where/Data.
|
||||
type SysGenTreeDemo struct {
|
||||
g.Meta `orm:"table:hg_sys_gen_tree_demo, do:true"`
|
||||
Id any // ID
|
||||
Pid any // 上级ID
|
||||
Level any // 关系树级别
|
||||
Tree any // 关系树
|
||||
CategoryId any // 分类ID
|
||||
Title any // 标题
|
||||
Description any // 描述
|
||||
Sort any // 排序
|
||||
Status any // 状态
|
||||
CreatedBy any // 创建者
|
||||
UpdatedBy any // 更新者
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
DeletedAt *gtime.Time // 删除时间
|
||||
}
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysLog is the golang structure of table hg_sys_log for DAO operations like Where/Data.
|
||||
type SysLog struct {
|
||||
g.Meta `orm:"table:hg_sys_log, do:true"`
|
||||
Id any // 日志ID
|
||||
ReqId any // 对外ID
|
||||
AppId any // 应用ID
|
||||
MerchantId any // 商户ID
|
||||
MemberId any // 用户ID
|
||||
Method any // 提交类型
|
||||
Module any // 访问模块
|
||||
Url any // 提交url
|
||||
GetData *gjson.Json // get数据
|
||||
PostData *gjson.Json // post数据
|
||||
HeaderData *gjson.Json // header数据
|
||||
Ip any // IP地址
|
||||
ProvinceId any // 省编码
|
||||
CityId any // 市编码
|
||||
ErrorCode any // 报错code
|
||||
ErrorMsg any // 对外错误提示
|
||||
ErrorData *gjson.Json // 报错日志
|
||||
UserAgent any // UA信息
|
||||
TakeUpTime any // 请求耗时
|
||||
Timestamp any // 响应时间
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysLoginLog is the golang structure of table hg_sys_login_log for DAO operations like Where/Data.
|
||||
type SysLoginLog struct {
|
||||
g.Meta `orm:"table:hg_sys_login_log, do:true"`
|
||||
Id any // 日志ID
|
||||
ReqId any // 请求ID
|
||||
MemberId any // 用户ID
|
||||
Username any // 用户名
|
||||
Response *gjson.Json // 响应数据
|
||||
LoginAt *gtime.Time // 登录时间
|
||||
LoginIp any // 登录IP
|
||||
ProvinceId any // 省编码
|
||||
CityId any // 市编码
|
||||
UserAgent any // UA信息
|
||||
ErrMsg any // 错误提示
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysProvinces is the golang structure of table hg_sys_provinces for DAO operations like Where/Data.
|
||||
type SysProvinces struct {
|
||||
g.Meta `orm:"table:hg_sys_provinces, do:true"`
|
||||
Id any // 省市区ID
|
||||
Title any // 栏目名称
|
||||
Pinyin any // 拼音
|
||||
Lng any // 经度
|
||||
Lat any // 纬度
|
||||
Pid any // 父栏目
|
||||
Level any // 关系树等级
|
||||
Tree any // 关系
|
||||
Sort any // 排序
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysServeLicense is the golang structure of table hg_sys_serve_license for DAO operations like Where/Data.
|
||||
type SysServeLicense struct {
|
||||
g.Meta `orm:"table:hg_sys_serve_license, do:true"`
|
||||
Id any // 许可ID
|
||||
Group any // 分组
|
||||
Name any // 许可名称
|
||||
Appid any // 应用ID
|
||||
SecretKey any // 应用秘钥
|
||||
RemoteAddr any // 最后连接地址
|
||||
OnlineLimit any // 在线限制
|
||||
LoginTimes any // 登录次数
|
||||
LastLoginAt *gtime.Time // 最后登录时间
|
||||
LastActiveAt *gtime.Time // 最后心跳
|
||||
Routes *gjson.Json // 路由表,空使用默认分组路由
|
||||
AllowedIps any // IP白名单
|
||||
EndAt *gtime.Time // 授权有效期
|
||||
Remark any // 备注
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysServeLog is the golang structure of table hg_sys_serve_log for DAO operations like Where/Data.
|
||||
type SysServeLog struct {
|
||||
g.Meta `orm:"table:hg_sys_serve_log, do:true"`
|
||||
Id any // 日志ID
|
||||
TraceId any // 链路ID
|
||||
LevelFormat any // 日志级别
|
||||
Content any // 日志内容
|
||||
Stack *gjson.Json // 打印堆栈
|
||||
Line any // 调用行
|
||||
TriggerNs any // 触发时间(ns)
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
}
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysSmsLog is the golang structure of table hg_sys_sms_log for DAO operations like Where/Data.
|
||||
type SysSmsLog struct {
|
||||
g.Meta `orm:"table:hg_sys_sms_log, do:true"`
|
||||
Id any // 主键
|
||||
Event any // 事件
|
||||
Mobile any // 手机号
|
||||
Code any // 验证码或短信内容
|
||||
Times any // 验证次数
|
||||
Ip any // ip地址
|
||||
Status any // 状态(1未验证,2已验证)
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
}
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// TestCategory is the golang structure of table hg_test_category for DAO operations like Where/Data.
|
||||
type TestCategory struct {
|
||||
g.Meta `orm:"table:hg_test_category, do:true"`
|
||||
Id any // 分类ID
|
||||
Name any // 分类名称
|
||||
ShortName any // 简称
|
||||
Description any // 描述
|
||||
Sort any // 排序
|
||||
Remark any // 备注
|
||||
Status any // 状态
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 修改时间
|
||||
DeletedAt *gtime.Time // 删除时间
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AddonHgexampleTable is the golang structure for table addon_hgexample_table.
|
||||
type AddonHgexampleTable struct {
|
||||
Id int64 `json:"id" orm:"id" description:"ID"`
|
||||
Pid int64 `json:"pid" orm:"pid" description:"上级ID"`
|
||||
Level int `json:"level" orm:"level" description:"树等级"`
|
||||
Tree string `json:"tree" orm:"tree" description:"关系树"`
|
||||
CategoryId int64 `json:"categoryId" orm:"category_id" description:"分类ID"`
|
||||
Flag *gjson.Json `json:"flag" orm:"flag" description:"标签"`
|
||||
Title string `json:"title" orm:"title" description:"标题"`
|
||||
Description string `json:"description" orm:"description" description:"描述"`
|
||||
Content string `json:"content" orm:"content" description:"内容"`
|
||||
Image string `json:"image" orm:"image" description:"单图"`
|
||||
Images *gjson.Json `json:"images" orm:"images" description:"多图"`
|
||||
Attachfile string `json:"attachfile" orm:"attachfile" description:"附件"`
|
||||
Attachfiles *gjson.Json `json:"attachfiles" orm:"attachfiles" description:"多附件"`
|
||||
Map *gjson.Json `json:"map" orm:"map" description:"动态键值对"`
|
||||
Star float64 `json:"star" orm:"star" description:"推荐星"`
|
||||
Price float64 `json:"price" orm:"price" description:"价格"`
|
||||
Views int64 `json:"views" orm:"views" description:"浏览次数"`
|
||||
ActivityAt *gtime.Time `json:"activityAt" orm:"activity_at" description:"活动时间"`
|
||||
StartAt *gtime.Time `json:"startAt" orm:"start_at" description:"开启时间"`
|
||||
EndAt *gtime.Time `json:"endAt" orm:"end_at" description:"结束时间"`
|
||||
Switch int `json:"switch" orm:"switch" description:"开关"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Avatar string `json:"avatar" orm:"avatar" description:"头像"`
|
||||
Sex int `json:"sex" orm:"sex" description:"性别"`
|
||||
Qq string `json:"qq" orm:"qq" description:"qq"`
|
||||
Email string `json:"email" orm:"email" description:"邮箱"`
|
||||
Mobile string `json:"mobile" orm:"mobile" description:"手机号码"`
|
||||
Hobby *gjson.Json `json:"hobby" orm:"hobby" description:"爱好"`
|
||||
Channel int `json:"channel" orm:"channel" description:"渠道"`
|
||||
CityId int64 `json:"cityId" orm:"city_id" description:"所在城市"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
|
||||
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间"`
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AddonHgexampleTenantOrder is the golang structure for table addon_hgexample_tenant_order.
|
||||
type AddonHgexampleTenantOrder struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键"`
|
||||
TenantId int64 `json:"tenantId" orm:"tenant_id" description:"租户ID"`
|
||||
MerchantId int64 `json:"merchantId" orm:"merchant_id" description:"商户ID"`
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"`
|
||||
ProductName string `json:"productName" orm:"product_name" description:"购买产品"`
|
||||
OrderSn string `json:"orderSn" orm:"order_sn" description:"订单号"`
|
||||
Money float64 `json:"money" orm:"money" description:"充值金额"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Status int `json:"status" orm:"status" description:"订单状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
}
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminCash is the golang structure for table admin_cash.
|
||||
type AdminCash struct {
|
||||
Id int64 `json:"id" orm:"id" description:"ID"`
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"管理员ID"`
|
||||
Money float64 `json:"money" orm:"money" description:"提现金额"`
|
||||
Fee float64 `json:"fee" orm:"fee" description:"手续费"`
|
||||
LastMoney float64 `json:"lastMoney" orm:"last_money" description:"最终到账金额"`
|
||||
Ip string `json:"ip" orm:"ip" description:"申请人IP"`
|
||||
Status int64 `json:"status" orm:"status" description:"状态码"`
|
||||
Msg string `json:"msg" orm:"msg" description:"处理结果"`
|
||||
HandleAt *gtime.Time `json:"handleAt" orm:"handle_at" description:"处理时间"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"申请时间"`
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminCreditsLog is the golang structure for table admin_credits_log.
|
||||
type AdminCreditsLog struct {
|
||||
Id int64 `json:"id" orm:"id" description:"变动ID"`
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"管理员ID"`
|
||||
AppId string `json:"appId" orm:"app_id" description:"应用id"`
|
||||
AddonsName string `json:"addonsName" orm:"addons_name" description:"插件名称"`
|
||||
CreditType string `json:"creditType" orm:"credit_type" description:"变动类型"`
|
||||
CreditGroup string `json:"creditGroup" orm:"credit_group" description:"变动组别"`
|
||||
BeforeNum float64 `json:"beforeNum" orm:"before_num" description:"变动前"`
|
||||
Num float64 `json:"num" orm:"num" description:"变动数据"`
|
||||
AfterNum float64 `json:"afterNum" orm:"after_num" description:"变动后"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Ip string `json:"ip" orm:"ip" description:"操作人IP"`
|
||||
MapId int64 `json:"mapId" orm:"map_id" description:"关联ID"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
}
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminDept is the golang structure for table admin_dept.
|
||||
type AdminDept struct {
|
||||
Id int64 `json:"id" orm:"id" description:"部门ID"`
|
||||
Pid int64 `json:"pid" orm:"pid" description:"父部门ID"`
|
||||
Name string `json:"name" orm:"name" description:"部门名称"`
|
||||
Code string `json:"code" orm:"code" description:"部门编码"`
|
||||
Type string `json:"type" orm:"type" description:"部门类型"`
|
||||
Leader string `json:"leader" orm:"leader" description:"负责人"`
|
||||
Phone string `json:"phone" orm:"phone" description:"联系电话"`
|
||||
Email string `json:"email" orm:"email" description:"邮箱"`
|
||||
Level int `json:"level" orm:"level" description:"关系树等级"`
|
||||
Tree string `json:"tree" orm:"tree" description:"关系树"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Status int `json:"status" orm:"status" description:"部门状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminMember is the golang structure for table admin_member.
|
||||
type AdminMember struct {
|
||||
Id int64 `json:"id" orm:"id" description:"管理员ID"`
|
||||
DeptId int64 `json:"deptId" orm:"dept_id" description:"部门ID"`
|
||||
RoleId int64 `json:"roleId" orm:"role_id" description:"角色ID"`
|
||||
RealName string `json:"realName" orm:"real_name" description:"真实姓名"`
|
||||
Username string `json:"username" orm:"username" description:"帐号"`
|
||||
PasswordHash string `json:"passwordHash" orm:"password_hash" description:"密码"`
|
||||
Salt string `json:"salt" orm:"salt" description:"密码盐"`
|
||||
PasswordResetToken string `json:"passwordResetToken" orm:"password_reset_token" description:"密码重置令牌"`
|
||||
Integral float64 `json:"integral" orm:"integral" description:"积分"`
|
||||
Balance float64 `json:"balance" orm:"balance" description:"余额"`
|
||||
Avatar string `json:"avatar" orm:"avatar" description:"头像"`
|
||||
Sex int `json:"sex" orm:"sex" description:"性别"`
|
||||
Qq string `json:"qq" orm:"qq" description:"qq"`
|
||||
Email string `json:"email" orm:"email" description:"邮箱"`
|
||||
Mobile string `json:"mobile" orm:"mobile" description:"手机号码"`
|
||||
Birthday *gtime.Time `json:"birthday" orm:"birthday" description:"生日"`
|
||||
CityId int64 `json:"cityId" orm:"city_id" description:"城市编码"`
|
||||
Address string `json:"address" orm:"address" description:"联系地址"`
|
||||
Pid int64 `json:"pid" orm:"pid" description:"上级管理员ID"`
|
||||
Level int `json:"level" orm:"level" description:"关系树等级"`
|
||||
Tree string `json:"tree" orm:"tree" description:"关系树"`
|
||||
InviteCode string `json:"inviteCode" orm:"invite_code" description:"邀请码"`
|
||||
Cash *gjson.Json `json:"cash" orm:"cash" description:"提现配置"`
|
||||
LastActiveAt *gtime.Time `json:"lastActiveAt" orm:"last_active_at" description:"最后活跃时间"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
// AdminMemberPost is the golang structure for table admin_member_post.
|
||||
type AdminMemberPost struct {
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"管理员ID"`
|
||||
PostId int64 `json:"postId" orm:"post_id" description:"岗位ID"`
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
// AdminMemberRole is the golang structure for table admin_member_role.
|
||||
type AdminMemberRole struct {
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"管理员ID"`
|
||||
RoleId int64 `json:"roleId" orm:"role_id" description:"角色ID"`
|
||||
}
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminMenu is the golang structure for table admin_menu.
|
||||
type AdminMenu struct {
|
||||
Id int64 `json:"id" orm:"id" description:"菜单ID"`
|
||||
Pid int64 `json:"pid" orm:"pid" description:"父菜单ID"`
|
||||
Level int `json:"level" orm:"level" description:"关系树等级"`
|
||||
Tree string `json:"tree" orm:"tree" description:"关系树"`
|
||||
Title string `json:"title" orm:"title" description:"菜单名称"`
|
||||
Name string `json:"name" orm:"name" description:"名称编码"`
|
||||
Path string `json:"path" orm:"path" description:"路由地址"`
|
||||
Icon string `json:"icon" orm:"icon" description:"菜单图标"`
|
||||
Type int `json:"type" orm:"type" description:"菜单类型(1目录 2菜单 3按钮)"`
|
||||
Redirect string `json:"redirect" orm:"redirect" description:"重定向地址"`
|
||||
Permissions string `json:"permissions" orm:"permissions" description:"菜单包含权限集合"`
|
||||
PermissionName string `json:"permissionName" orm:"permission_name" description:"权限名称"`
|
||||
Component string `json:"component" orm:"component" description:"组件路径"`
|
||||
AlwaysShow int `json:"alwaysShow" orm:"always_show" description:"取消自动计算根路由模式"`
|
||||
ActiveMenu string `json:"activeMenu" orm:"active_menu" description:"高亮菜单编码"`
|
||||
IsRoot int `json:"isRoot" orm:"is_root" description:"是否跟路由"`
|
||||
IsFrame int `json:"isFrame" orm:"is_frame" description:"是否内嵌"`
|
||||
FrameSrc string `json:"frameSrc" orm:"frame_src" description:"内联外部地址"`
|
||||
KeepAlive int `json:"keepAlive" orm:"keep_alive" description:"缓存该路由"`
|
||||
Hidden int `json:"hidden" orm:"hidden" description:"是否隐藏"`
|
||||
Affix int `json:"affix" orm:"affix" description:"是否固定"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Status int `json:"status" orm:"status" description:"菜单状态"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
}
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminNotice is the golang structure for table admin_notice.
|
||||
type AdminNotice struct {
|
||||
Id int64 `json:"id" orm:"id" description:"公告ID"`
|
||||
Title string `json:"title" orm:"title" description:"公告标题"`
|
||||
Type int64 `json:"type" orm:"type" description:"公告类型"`
|
||||
Tag int `json:"tag" orm:"tag" description:"标签"`
|
||||
Content string `json:"content" orm:"content" description:"公告内容"`
|
||||
Receiver *gjson.Json `json:"receiver" orm:"receiver" description:"接收者"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Status int `json:"status" orm:"status" description:"公告状态"`
|
||||
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"发送人"`
|
||||
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"修改人"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间"`
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminNoticeRead is the golang structure for table admin_notice_read.
|
||||
type AdminNoticeRead struct {
|
||||
Id int64 `json:"id" orm:"id" description:"记录ID"`
|
||||
NoticeId int64 `json:"noticeId" orm:"notice_id" description:"公告ID"`
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"会员ID"`
|
||||
Clicks int `json:"clicks" orm:"clicks" description:"已读次数"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"阅读时间"`
|
||||
}
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminOauth is the golang structure for table admin_oauth.
|
||||
type AdminOauth struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键"`
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"用户ID"`
|
||||
Unionid string `json:"unionid" orm:"unionid" description:"唯一ID"`
|
||||
OauthClient string `json:"oauthClient" orm:"oauth_client" description:"授权组别"`
|
||||
OauthOpenid string `json:"oauthOpenid" orm:"oauth_openid" description:"授权开放ID"`
|
||||
Sex int `json:"sex" orm:"sex" description:"性别"`
|
||||
Nickname string `json:"nickname" orm:"nickname" description:"昵称"`
|
||||
HeadPortrait string `json:"headPortrait" orm:"head_portrait" description:"头像"`
|
||||
Birthday *gtime.Time `json:"birthday" orm:"birthday" description:"生日"`
|
||||
Country string `json:"country" orm:"country" description:"国家"`
|
||||
Province string `json:"province" orm:"province" description:"省"`
|
||||
City string `json:"city" orm:"city" description:"市"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
}
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminOrder is the golang structure for table admin_order.
|
||||
type AdminOrder struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键"`
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"管理员id"`
|
||||
OrderType string `json:"orderType" orm:"order_type" description:"订单类型"`
|
||||
ProductId int64 `json:"productId" orm:"product_id" description:"产品id"`
|
||||
OrderSn string `json:"orderSn" orm:"order_sn" description:"关联订单号"`
|
||||
Money float64 `json:"money" orm:"money" description:"充值金额"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
RefundReason string `json:"refundReason" orm:"refund_reason" description:"退款原因"`
|
||||
RejectRefundReason string `json:"rejectRefundReason" orm:"reject_refund_reason" description:"拒绝退款原因"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
}
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminPost is the golang structure for table admin_post.
|
||||
type AdminPost struct {
|
||||
Id int64 `json:"id" orm:"id" description:"岗位ID"`
|
||||
Code string `json:"code" orm:"code" description:"岗位编码"`
|
||||
Name string `json:"name" orm:"name" description:"岗位名称"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// AdminRole is the golang structure for table admin_role.
|
||||
type AdminRole struct {
|
||||
Id int64 `json:"id" orm:"id" description:"角色ID"`
|
||||
Name string `json:"name" orm:"name" description:"角色名称"`
|
||||
Key string `json:"key" orm:"key" description:"角色权限字符串"`
|
||||
DataScope int `json:"dataScope" orm:"data_scope" description:"数据范围"`
|
||||
CustomDept *gjson.Json `json:"customDept" orm:"custom_dept" description:"自定义部门权限"`
|
||||
Pid int64 `json:"pid" orm:"pid" description:"上级角色ID"`
|
||||
Level int `json:"level" orm:"level" description:"关系树等级"`
|
||||
Tree string `json:"tree" orm:"tree" description:"关系树"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Status int `json:"status" orm:"status" description:"角色状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
// AdminRoleCasbin is the golang structure for table admin_role_casbin.
|
||||
type AdminRoleCasbin struct {
|
||||
Id int64 `json:"id" orm:"id" description:""`
|
||||
PType string `json:"pType" orm:"p_type" description:""`
|
||||
V0 string `json:"v0" orm:"v0" description:""`
|
||||
V1 string `json:"v1" orm:"v1" description:""`
|
||||
V2 string `json:"v2" orm:"v2" description:""`
|
||||
V3 string `json:"v3" orm:"v3" description:""`
|
||||
V4 string `json:"v4" orm:"v4" description:""`
|
||||
V5 string `json:"v5" orm:"v5" description:""`
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
// AdminRoleMenu is the golang structure for table admin_role_menu.
|
||||
type AdminRoleMenu struct {
|
||||
RoleId int64 `json:"roleId" orm:"role_id" description:"角色ID"`
|
||||
MenuId int64 `json:"menuId" orm:"menu_id" description:"菜单ID"`
|
||||
}
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// PayLog is the golang structure for table pay_log.
|
||||
type PayLog struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键"`
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"会员ID"`
|
||||
AppId string `json:"appId" orm:"app_id" description:"应用ID"`
|
||||
AddonsName string `json:"addonsName" orm:"addons_name" description:"插件名称"`
|
||||
OrderSn string `json:"orderSn" orm:"order_sn" description:"关联订单号"`
|
||||
OrderGroup string `json:"orderGroup" orm:"order_group" description:"组别[默认统一支付类型]"`
|
||||
Openid string `json:"openid" orm:"openid" description:"openid"`
|
||||
MchId string `json:"mchId" orm:"mch_id" description:"商户支付账户"`
|
||||
Subject string `json:"subject" orm:"subject" description:"订单标题"`
|
||||
Detail *gjson.Json `json:"detail" orm:"detail" description:"支付商品详情"`
|
||||
AuthCode string `json:"authCode" orm:"auth_code" description:"刷卡码"`
|
||||
OutTradeNo string `json:"outTradeNo" orm:"out_trade_no" description:"商户订单号"`
|
||||
TransactionId string `json:"transactionId" orm:"transaction_id" description:"交易号"`
|
||||
PayType string `json:"payType" orm:"pay_type" description:"支付类型"`
|
||||
PayAmount float64 `json:"payAmount" orm:"pay_amount" description:"支付金额"`
|
||||
ActualAmount float64 `json:"actualAmount" orm:"actual_amount" description:"实付金额"`
|
||||
PayStatus int `json:"payStatus" orm:"pay_status" description:"支付状态"`
|
||||
PayAt *gtime.Time `json:"payAt" orm:"pay_at" description:"支付时间"`
|
||||
TradeType string `json:"tradeType" orm:"trade_type" description:"交易类型"`
|
||||
RefundSn string `json:"refundSn" orm:"refund_sn" description:"退款单号"`
|
||||
IsRefund int `json:"isRefund" orm:"is_refund" description:"是否退款"`
|
||||
Custom string `json:"custom" orm:"custom" description:"自定义参数"`
|
||||
CreateIp string `json:"createIp" orm:"create_ip" description:"创建者IP"`
|
||||
PayIp string `json:"payIp" orm:"pay_ip" description:"支付者IP"`
|
||||
NotifyUrl string `json:"notifyUrl" orm:"notify_url" description:"支付通知回调地址"`
|
||||
ReturnUrl string `json:"returnUrl" orm:"return_url" description:"买家付款成功跳转地址"`
|
||||
TraceIds *gjson.Json `json:"traceIds" orm:"trace_ids" description:"链路ID集合"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
}
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// PayRefund is the golang structure for table pay_refund.
|
||||
type PayRefund struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键ID"`
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"会员ID"`
|
||||
AppId string `json:"appId" orm:"app_id" description:"应用ID"`
|
||||
OrderSn string `json:"orderSn" orm:"order_sn" description:"业务订单号"`
|
||||
RefundTradeNo string `json:"refundTradeNo" orm:"refund_trade_no" description:"退款交易号"`
|
||||
RefundMoney float64 `json:"refundMoney" orm:"refund_money" description:"退款金额"`
|
||||
RefundWay int `json:"refundWay" orm:"refund_way" description:"退款方式"`
|
||||
Ip string `json:"ip" orm:"ip" description:"申请者IP"`
|
||||
Reason string `json:"reason" orm:"reason" description:"申请退款原因"`
|
||||
Remark string `json:"remark" orm:"remark" description:"退款备注"`
|
||||
Status int `json:"status" orm:"status" description:"退款状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"申请时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysAddonsConfig is the golang structure for table sys_addons_config.
|
||||
type SysAddonsConfig struct {
|
||||
Id int64 `json:"id" orm:"id" description:"配置ID"`
|
||||
AddonName string `json:"addonName" orm:"addon_name" description:"插件名称"`
|
||||
Group string `json:"group" orm:"group" description:"分组"`
|
||||
Name string `json:"name" orm:"name" description:"参数名称"`
|
||||
Type string `json:"type" orm:"type" description:"键值类型:string,int,uint,bool,TIMESTAMP,date"`
|
||||
Key string `json:"key" orm:"key" description:"参数键名"`
|
||||
Value string `json:"value" orm:"value" description:"参数键值"`
|
||||
DefaultValue string `json:"defaultValue" orm:"default_value" description:"默认值"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Tip string `json:"tip" orm:"tip" description:"变量描述"`
|
||||
IsDefault int `json:"isDefault" orm:"is_default" description:"是否为系统默认"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysAddonsInstall is the golang structure for table sys_addons_install.
|
||||
type SysAddonsInstall struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键"`
|
||||
Name string `json:"name" orm:"name" description:"插件名称"`
|
||||
Version string `json:"version" orm:"version" description:"版本号"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysAttachment is the golang structure for table sys_attachment.
|
||||
type SysAttachment struct {
|
||||
Id int64 `json:"id" orm:"id" description:"文件ID"`
|
||||
AppId string `json:"appId" orm:"app_id" description:"应用ID"`
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"管理员ID"`
|
||||
CateId int64 `json:"cateId" orm:"cate_id" description:"上传分类"`
|
||||
Drive string `json:"drive" orm:"drive" description:"上传驱动"`
|
||||
Name string `json:"name" orm:"name" description:"文件原始名"`
|
||||
Kind string `json:"kind" orm:"kind" description:"上传类型"`
|
||||
MimeType string `json:"mimeType" orm:"mime_type" description:"扩展类型"`
|
||||
NaiveType string `json:"naiveType" orm:"naive_type" description:"NaiveUI类型"`
|
||||
Path string `json:"path" orm:"path" description:"本地路径"`
|
||||
FileUrl string `json:"fileUrl" orm:"file_url" description:"url"`
|
||||
Size int64 `json:"size" orm:"size" description:"文件大小"`
|
||||
Ext string `json:"ext" orm:"ext" description:"扩展名"`
|
||||
Md5 string `json:"md5" orm:"md5" description:"md5校验码"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysBlacklist is the golang structure for table sys_blacklist.
|
||||
type SysBlacklist struct {
|
||||
Id int64 `json:"id" orm:"id" description:"黑名单ID"`
|
||||
Ip string `json:"ip" orm:"ip" description:"IP地址"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysConfig is the golang structure for table sys_config.
|
||||
type SysConfig struct {
|
||||
Id int64 `json:"id" orm:"id" description:"配置ID"`
|
||||
Group string `json:"group" orm:"group" description:"配置分组"`
|
||||
Name string `json:"name" orm:"name" description:"参数名称"`
|
||||
Type string `json:"type" orm:"type" description:"键值类型:string,int,uint,bool,TIMESTAMP,date"`
|
||||
Key string `json:"key" orm:"key" description:"参数键名"`
|
||||
Value string `json:"value" orm:"value" description:"参数键值"`
|
||||
DefaultValue string `json:"defaultValue" orm:"default_value" description:"默认值"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Tip string `json:"tip" orm:"tip" description:"变量描述"`
|
||||
IsDefault int `json:"isDefault" orm:"is_default" description:"是否为系统默认"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysCron is the golang structure for table sys_cron.
|
||||
type SysCron struct {
|
||||
Id int64 `json:"id" orm:"id" description:"任务ID"`
|
||||
GroupId int64 `json:"groupId" orm:"group_id" description:"分组ID"`
|
||||
Title string `json:"title" orm:"title" description:"任务标题"`
|
||||
Name string `json:"name" orm:"name" description:"任务方法"`
|
||||
Params string `json:"params" orm:"params" description:"函数参数"`
|
||||
Pattern string `json:"pattern" orm:"pattern" description:"表达式"`
|
||||
Policy int64 `json:"policy" orm:"policy" description:"策略"`
|
||||
Count int64 `json:"count" orm:"count" description:"执行次数"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Status int `json:"status" orm:"status" description:"任务状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysCronGroup is the golang structure for table sys_cron_group.
|
||||
type SysCronGroup struct {
|
||||
Id int64 `json:"id" orm:"id" description:"任务分组ID"`
|
||||
Pid int64 `json:"pid" orm:"pid" description:"父类任务分组ID"`
|
||||
Name string `json:"name" orm:"name" description:"分组名称"`
|
||||
IsDefault int `json:"isDefault" orm:"is_default" description:"是否默认"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Status int `json:"status" orm:"status" description:"分组状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysDictData is the golang structure for table sys_dict_data.
|
||||
type SysDictData struct {
|
||||
Id int64 `json:"id" orm:"id" description:"字典数据ID"`
|
||||
Label string `json:"label" orm:"label" description:"字典标签"`
|
||||
Value string `json:"value" orm:"value" description:"字典键值"`
|
||||
ValueType string `json:"valueType" orm:"value_type" description:"键值数据类型:string,int,uint,bool,TIMESTAMP,date"`
|
||||
Type string `json:"type" orm:"type" description:"字典类型"`
|
||||
ListClass string `json:"listClass" orm:"list_class" description:"表格回显样式"`
|
||||
IsDefault int `json:"isDefault" orm:"is_default" description:"是否为系统默认"`
|
||||
Sort int `json:"sort" orm:"sort" description:"字典排序"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysDictType is the golang structure for table sys_dict_type.
|
||||
type SysDictType struct {
|
||||
Id int64 `json:"id" orm:"id" description:"字典类型ID"`
|
||||
Pid int64 `json:"pid" orm:"pid" description:"父类字典类型ID"`
|
||||
Name string `json:"name" orm:"name" description:"字典类型名称"`
|
||||
Type string `json:"type" orm:"type" description:"字典类型"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Status int `json:"status" orm:"status" description:"字典类型状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysEmsLog is the golang structure for table sys_ems_log.
|
||||
type SysEmsLog struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键"`
|
||||
Event string `json:"event" orm:"event" description:"事件"`
|
||||
Email string `json:"email" orm:"email" description:"邮箱地址,多个用;隔开"`
|
||||
Code string `json:"code" orm:"code" description:"验证码"`
|
||||
Times int64 `json:"times" orm:"times" description:"验证次数"`
|
||||
Content string `json:"content" orm:"content" description:"邮件内容"`
|
||||
Ip string `json:"ip" orm:"ip" description:"ip地址"`
|
||||
Status int `json:"status" orm:"status" description:"状态(1未验证,2已验证)"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysGenCodes is the golang structure for table sys_gen_codes.
|
||||
type SysGenCodes struct {
|
||||
Id int64 `json:"id" orm:"id" description:"生成ID"`
|
||||
GenType int `json:"genType" orm:"gen_type" description:"生成类型"`
|
||||
GenTemplate int `json:"genTemplate" orm:"gen_template" description:"生成模板"`
|
||||
VarName string `json:"varName" orm:"var_name" description:"实体命名"`
|
||||
Options *gjson.Json `json:"options" orm:"options" description:"配置选项"`
|
||||
DbName string `json:"dbName" orm:"db_name" description:"数据库名称"`
|
||||
TableName string `json:"tableName" orm:"table_name" description:"主表名称"`
|
||||
TableComment string `json:"tableComment" orm:"table_comment" description:"主表注释"`
|
||||
DaoName string `json:"daoName" orm:"dao_name" description:"主表dao模型"`
|
||||
MasterColumns *gjson.Json `json:"masterColumns" orm:"master_columns" description:"主表字段"`
|
||||
AddonName string `json:"addonName" orm:"addon_name" description:"插件名称"`
|
||||
Status int `json:"status" orm:"status" description:"生成状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysGenCurdDemo is the golang structure for table sys_gen_curd_demo.
|
||||
type SysGenCurdDemo struct {
|
||||
Id int64 `json:"id" orm:"id" description:"ID"`
|
||||
CategoryId int64 `json:"categoryId" orm:"category_id" description:"分类ID"`
|
||||
Title string `json:"title" orm:"title" description:"标题"`
|
||||
Description string `json:"description" orm:"description" description:"描述"`
|
||||
Content string `json:"content" orm:"content" description:"内容"`
|
||||
Image string `json:"image" orm:"image" description:"单图"`
|
||||
Attachfile string `json:"attachfile" orm:"attachfile" description:"附件"`
|
||||
CityId int64 `json:"cityId" orm:"city_id" description:"所在城市"`
|
||||
Switch int `json:"switch" orm:"switch" description:"显示开关"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
|
||||
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
|
||||
DeletedBy int64 `json:"deletedBy" orm:"deleted_by" description:"删除者"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间"`
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysGenTreeDemo is the golang structure for table sys_gen_tree_demo.
|
||||
type SysGenTreeDemo struct {
|
||||
Id int64 `json:"id" orm:"id" description:"ID"`
|
||||
Pid int64 `json:"pid" orm:"pid" description:"上级ID"`
|
||||
Level int `json:"level" orm:"level" description:"关系树级别"`
|
||||
Tree string `json:"tree" orm:"tree" description:"关系树"`
|
||||
CategoryId int64 `json:"categoryId" orm:"category_id" description:"分类ID"`
|
||||
Title string `json:"title" orm:"title" description:"标题"`
|
||||
Description string `json:"description" orm:"description" description:"描述"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
|
||||
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间"`
|
||||
}
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysLog is the golang structure for table sys_log.
|
||||
type SysLog struct {
|
||||
Id int64 `json:"id" orm:"id" description:"日志ID"`
|
||||
ReqId string `json:"reqId" orm:"req_id" description:"对外ID"`
|
||||
AppId string `json:"appId" orm:"app_id" description:"应用ID"`
|
||||
MerchantId int64 `json:"merchantId" orm:"merchant_id" description:"商户ID"`
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"用户ID"`
|
||||
Method string `json:"method" orm:"method" description:"提交类型"`
|
||||
Module string `json:"module" orm:"module" description:"访问模块"`
|
||||
Url string `json:"url" orm:"url" description:"提交url"`
|
||||
GetData *gjson.Json `json:"getData" orm:"get_data" description:"get数据"`
|
||||
PostData *gjson.Json `json:"postData" orm:"post_data" description:"post数据"`
|
||||
HeaderData *gjson.Json `json:"headerData" orm:"header_data" description:"header数据"`
|
||||
Ip string `json:"ip" orm:"ip" description:"IP地址"`
|
||||
ProvinceId int64 `json:"provinceId" orm:"province_id" description:"省编码"`
|
||||
CityId int64 `json:"cityId" orm:"city_id" description:"市编码"`
|
||||
ErrorCode int `json:"errorCode" orm:"error_code" description:"报错code"`
|
||||
ErrorMsg string `json:"errorMsg" orm:"error_msg" description:"对外错误提示"`
|
||||
ErrorData *gjson.Json `json:"errorData" orm:"error_data" description:"报错日志"`
|
||||
UserAgent string `json:"userAgent" orm:"user_agent" description:"UA信息"`
|
||||
TakeUpTime int64 `json:"takeUpTime" orm:"take_up_time" description:"请求耗时"`
|
||||
Timestamp int64 `json:"timestamp" orm:"timestamp" description:"响应时间"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysLoginLog is the golang structure for table sys_login_log.
|
||||
type SysLoginLog struct {
|
||||
Id int64 `json:"id" orm:"id" description:"日志ID"`
|
||||
ReqId string `json:"reqId" orm:"req_id" description:"请求ID"`
|
||||
MemberId int64 `json:"memberId" orm:"member_id" description:"用户ID"`
|
||||
Username string `json:"username" orm:"username" description:"用户名"`
|
||||
Response *gjson.Json `json:"response" orm:"response" description:"响应数据"`
|
||||
LoginAt *gtime.Time `json:"loginAt" orm:"login_at" description:"登录时间"`
|
||||
LoginIp string `json:"loginIp" orm:"login_ip" description:"登录IP"`
|
||||
ProvinceId int64 `json:"provinceId" orm:"province_id" description:"省编码"`
|
||||
CityId int64 `json:"cityId" orm:"city_id" description:"市编码"`
|
||||
UserAgent string `json:"userAgent" orm:"user_agent" description:"UA信息"`
|
||||
ErrMsg string `json:"errMsg" orm:"err_msg" description:"错误提示"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysProvinces is the golang structure for table sys_provinces.
|
||||
type SysProvinces struct {
|
||||
Id int64 `json:"id" orm:"id" description:"省市区ID"`
|
||||
Title string `json:"title" orm:"title" description:"栏目名称"`
|
||||
Pinyin string `json:"pinyin" orm:"pinyin" description:"拼音"`
|
||||
Lng string `json:"lng" orm:"lng" description:"经度"`
|
||||
Lat string `json:"lat" orm:"lat" description:"纬度"`
|
||||
Pid int64 `json:"pid" orm:"pid" description:"父栏目"`
|
||||
Level int `json:"level" orm:"level" description:"关系树等级"`
|
||||
Tree string `json:"tree" orm:"tree" description:"关系"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysServeLicense is the golang structure for table sys_serve_license.
|
||||
type SysServeLicense struct {
|
||||
Id int64 `json:"id" orm:"id" description:"许可ID"`
|
||||
Group string `json:"group" orm:"group" description:"分组"`
|
||||
Name string `json:"name" orm:"name" description:"许可名称"`
|
||||
Appid string `json:"appid" orm:"appid" description:"应用ID"`
|
||||
SecretKey string `json:"secretKey" orm:"secret_key" description:"应用秘钥"`
|
||||
RemoteAddr string `json:"remoteAddr" orm:"remote_addr" description:"最后连接地址"`
|
||||
OnlineLimit int `json:"onlineLimit" orm:"online_limit" description:"在线限制"`
|
||||
LoginTimes int64 `json:"loginTimes" orm:"login_times" description:"登录次数"`
|
||||
LastLoginAt *gtime.Time `json:"lastLoginAt" orm:"last_login_at" description:"最后登录时间"`
|
||||
LastActiveAt *gtime.Time `json:"lastActiveAt" orm:"last_active_at" description:"最后心跳"`
|
||||
Routes *gjson.Json `json:"routes" orm:"routes" description:"路由表,空使用默认分组路由"`
|
||||
AllowedIps string `json:"allowedIps" orm:"allowed_ips" description:"IP白名单"`
|
||||
EndAt *gtime.Time `json:"endAt" orm:"end_at" description:"授权有效期"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysServeLog is the golang structure for table sys_serve_log.
|
||||
type SysServeLog struct {
|
||||
Id int64 `json:"id" orm:"id" description:"日志ID"`
|
||||
TraceId string `json:"traceId" orm:"trace_id" description:"链路ID"`
|
||||
LevelFormat string `json:"levelFormat" orm:"level_format" description:"日志级别"`
|
||||
Content string `json:"content" orm:"content" description:"日志内容"`
|
||||
Stack *gjson.Json `json:"stack" orm:"stack" description:"打印堆栈"`
|
||||
Line string `json:"line" orm:"line" description:"调用行"`
|
||||
TriggerNs int64 `json:"triggerNs" orm:"trigger_ns" description:"触发时间(ns)"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
}
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// SysSmsLog is the golang structure for table sys_sms_log.
|
||||
type SysSmsLog struct {
|
||||
Id int64 `json:"id" orm:"id" description:"主键"`
|
||||
Event string `json:"event" orm:"event" description:"事件"`
|
||||
Mobile string `json:"mobile" orm:"mobile" description:"手机号"`
|
||||
Code string `json:"code" orm:"code" description:"验证码或短信内容"`
|
||||
Times int64 `json:"times" orm:"times" description:"验证次数"`
|
||||
Ip string `json:"ip" orm:"ip" description:"ip地址"`
|
||||
Status int `json:"status" orm:"status" description:"状态(1未验证,2已验证)"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// TestCategory is the golang structure for table test_category.
|
||||
type TestCategory struct {
|
||||
Id int64 `json:"id" orm:"id" description:"分类ID"`
|
||||
Name string `json:"name" orm:"name" description:"分类名称"`
|
||||
ShortName string `json:"shortName" orm:"short_name" description:"简称"`
|
||||
Description string `json:"description" orm:"description" description:"描述"`
|
||||
Sort int `json:"sort" orm:"sort" description:"排序"`
|
||||
Remark string `json:"remark" orm:"remark" description:"备注"`
|
||||
Status int `json:"status" orm:"status" description:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"修改时间"`
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间"`
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
// Package model
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package model
|
||||
|
||||
// GenCodesColumn 生成表字段属性
|
||||
type GenCodesColumn struct {
|
||||
// 表属性
|
||||
Id int64 `json:"id" dc:"序号"`
|
||||
Name string `json:"name" dc:"字段列名"`
|
||||
Dc string `json:"dc" dc:"字段描述"`
|
||||
DataType string `json:"dataType" dc:"字段类型"`
|
||||
SqlType string `json:"sqlType" dc:"物理类型"`
|
||||
Length int64 `json:"length" dc:"字段长度"`
|
||||
IsAllowNull string `json:"isAllowNull" dc:"是否允许为空"`
|
||||
DefaultValue interface{} `json:"defaultValue" dc:"默认值"`
|
||||
Index string `json:"index" dc:"索引"`
|
||||
Extra string `json:"extra" dc:"额外选项"`
|
||||
// 自定义生成属性
|
||||
// Alias string `json:"alias" dc:"字段别名"`
|
||||
GoName string `json:"goName" dc:"Go属性"`
|
||||
GoType string `json:"goType" dc:"Go类型"`
|
||||
TsName string `json:"tsName" dc:"Ts属性"`
|
||||
TsType string `json:"tsType" dc:"Ts类型"`
|
||||
IsList bool `json:"isList" dc:"列表"`
|
||||
IsExport bool `json:"isExport" dc:"导出"`
|
||||
IsSort bool `json:"isSort" dc:"排序"`
|
||||
IsQuery bool `json:"isQuery" dc:"查询"`
|
||||
QueryWhere string `json:"queryWhere" dc:"查询条件"`
|
||||
IsEdit bool `json:"isEdit" dc:"编辑"`
|
||||
Required bool `json:"required" dc:"必填"`
|
||||
Unique bool `json:"unique" dc:"唯一性"`
|
||||
FormMode string `json:"formMode" dc:"表单组件"`
|
||||
FormRole string `json:"formRole" dc:"表单验证"`
|
||||
FormGridSpan int `json:"formGridSpan" dc:"栅格占位数量"`
|
||||
DictType int64 `json:"dictType" dc:"字典类型ID"`
|
||||
Align string `json:"align" dc:"排列方式"`
|
||||
Width int64 `json:"width" dc:"列宽"`
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"hotgo/internal/library/hgorm/hook"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// CashViewInp 获取信息
|
||||
type CashViewInp struct {
|
||||
Id int64 `json:"id" v:"required#提现ID不能为空" dc:"提现ID"`
|
||||
}
|
||||
|
||||
type CashViewModel struct {
|
||||
entity.AdminCash
|
||||
MemberCash
|
||||
}
|
||||
|
||||
// CashListInp 获取列表
|
||||
type CashListInp struct {
|
||||
form.PageReq
|
||||
form.StatusReq
|
||||
MemberId int64 `json:"memberId"`
|
||||
CreatedAt []int64 `json:"created_at"`
|
||||
ComplexMemberId []string `json:"complexMemberId" dc:"申请人"`
|
||||
}
|
||||
|
||||
type CashListModel struct {
|
||||
MemberBySumma *hook.MemberSumma `json:"memberBySumma" dc:"申请人信息"`
|
||||
entity.AdminCash
|
||||
}
|
||||
|
||||
// CashApplyInp 申请提现
|
||||
type CashApplyInp struct {
|
||||
Money float64 `json:"money" description:"提现金额"`
|
||||
MemberId int64
|
||||
}
|
||||
|
||||
// CashPaymentInp 提现打款处理
|
||||
type CashPaymentInp struct {
|
||||
Id int64 `json:"id" description:"ID"`
|
||||
Status int64 `json:"status" description:"状态码"`
|
||||
Msg string `json:"msg" description:"处理结果"`
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
// @AutoGenerate Version 2.5.3
|
||||
// @AutoGenerate Date 2023-04-15 15:59:58
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/library/contexts"
|
||||
"hotgo/internal/library/hgorm/hook"
|
||||
"hotgo/internal/library/location"
|
||||
"hotgo/internal/model/input/form"
|
||||
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// CreditsLogSaveBalanceInp 更新余额
|
||||
type CreditsLogSaveBalanceInp struct {
|
||||
MemberId int64 `json:"memberId" dc:"管理员ID"`
|
||||
AppId string `json:"appId" dc:"应用id"`
|
||||
AddonsName string `json:"addonsName" dc:"插件名称"`
|
||||
CreditGroup string `json:"creditGroup" dc:"变动的组别"`
|
||||
Num float64 `json:"num" dc:"变动数据"`
|
||||
Ip string `json:"ip" dc:"操作人IP"`
|
||||
MapId int64 `json:"mapId" dc:"关联ID"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
}
|
||||
|
||||
func (in *CreditsLogSaveBalanceInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Num == 0 {
|
||||
err = gerror.New("更新余额不能为0")
|
||||
}
|
||||
|
||||
if in.AppId == "" {
|
||||
in.AppId = contexts.GetModule(ctx)
|
||||
}
|
||||
|
||||
if in.CreditGroup == "" {
|
||||
if in.Num > 0 {
|
||||
in.CreditGroup = consts.CreditGroupIncr
|
||||
} else {
|
||||
in.CreditGroup = consts.CreditGroupDecr
|
||||
}
|
||||
}
|
||||
|
||||
if in.Ip == "" {
|
||||
in.Ip = location.GetClientIp(ghttp.RequestFromCtx(ctx))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type CreditsLogSaveBalanceModel struct {
|
||||
}
|
||||
|
||||
// CreditsLogSaveIntegralInp 更新积分
|
||||
type CreditsLogSaveIntegralInp struct {
|
||||
MemberId int64 `json:"memberId" dc:"管理员ID"`
|
||||
AppId string `json:"appId" dc:"应用id"`
|
||||
AddonsName string `json:"addonsName" dc:"插件名称"`
|
||||
CreditGroup string `json:"creditGroup" dc:"变动的组别"`
|
||||
Num float64 `json:"num" dc:"变动数据"`
|
||||
Ip string `json:"ip" dc:"操作人IP"`
|
||||
MapId int64 `json:"mapId" dc:"关联ID"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
}
|
||||
|
||||
func (in *CreditsLogSaveIntegralInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Num == 0 {
|
||||
err = gerror.New("更新积分不能为0")
|
||||
}
|
||||
|
||||
if in.AppId == "" {
|
||||
in.AppId = contexts.GetModule(ctx)
|
||||
}
|
||||
|
||||
if in.CreditGroup == "" {
|
||||
if in.Num > 0 {
|
||||
in.CreditGroup = consts.CreditGroupIncr
|
||||
} else {
|
||||
in.CreditGroup = consts.CreditGroupDecr
|
||||
}
|
||||
}
|
||||
|
||||
if in.Ip == "" {
|
||||
in.Ip = location.GetClientIp(ghttp.RequestFromCtx(ctx))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type CreditsLogSaveIntegralModel struct {
|
||||
}
|
||||
|
||||
// CreditsLogListInp 获取资产变动列表
|
||||
type CreditsLogListInp struct {
|
||||
form.PageReq
|
||||
Id int64 `json:"id" dc:"变动ID"`
|
||||
MemberId int64 `json:"memberId" dc:"管理员ID"`
|
||||
AppId string `json:"appId" dc:"应用id"`
|
||||
CreditType string `json:"creditType" dc:"变动类型"`
|
||||
CreditGroup string `json:"creditGroup" dc:"变动的组别"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
Ip string `json:"ip" dc:"操作人IP"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
ComplexMemberId []string `json:"complexMemberId" dc:"用户"`
|
||||
}
|
||||
|
||||
func (in *CreditsLogListInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type CreditsLogListModel struct {
|
||||
Id int64 `json:"id" dc:"变动ID"`
|
||||
MemberId int64 `json:"memberId" dc:"管理员ID"`
|
||||
AppId string `json:"appId" dc:"应用id"`
|
||||
AddonsName string `json:"addonsName" dc:"插件名称"`
|
||||
CreditType string `json:"creditType" dc:"变动类型"`
|
||||
CreditGroup string `json:"creditGroup" dc:"变动的组别"`
|
||||
BeforeNum float64 `json:"beforeNum" dc:"变动前"`
|
||||
Num float64 `json:"num" dc:"变动数据"`
|
||||
AfterNum float64 `json:"afterNum" dc:"变动后"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
Ip string `json:"ip" dc:"操作人IP"`
|
||||
MapId int64 `json:"mapId" dc:"关联ID"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"`
|
||||
MemberBySumma *hook.MemberSumma `json:"memberBySumma" dc:"用户信息"`
|
||||
}
|
||||
|
||||
// CreditsLogExportModel 导出资产变动
|
||||
type CreditsLogExportModel struct {
|
||||
Id int64 `json:"id" dc:"变动ID"`
|
||||
MemberId int64 `json:"memberId" dc:"管理员ID"`
|
||||
AppId string `json:"appId" dc:"应用id"`
|
||||
AddonsName string `json:"addonsName" dc:"插件名称"`
|
||||
CreditType string `json:"creditType" dc:"变动类型"`
|
||||
CreditGroup string `json:"creditGroup" dc:"变动的组别"`
|
||||
BeforeNum float64 `json:"beforeNum" dc:"变动前"`
|
||||
Num float64 `json:"num" dc:"变动数据"`
|
||||
AfterNum float64 `json:"afterNum" dc:"变动后"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
Ip string `json:"ip" dc:"操作人IP"`
|
||||
MapId int64 `json:"mapId" dc:"关联ID"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"`
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @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/tree"
|
||||
"hotgo/utility/validate"
|
||||
)
|
||||
|
||||
// DeptMaxSortInp 最大排序
|
||||
type DeptMaxSortInp struct {
|
||||
Id int64 `json:"id" dc:"部门ID"`
|
||||
}
|
||||
|
||||
type DeptMaxSortModel struct {
|
||||
Sort int `json:"sort"`
|
||||
}
|
||||
|
||||
// DeptEditInp 修改/新增部门数据
|
||||
type DeptEditInp struct {
|
||||
entity.AdminDept
|
||||
}
|
||||
|
||||
func (in *DeptEditInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Name == "" {
|
||||
err = gerror.New("名称不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
if in.Id > 0 && in.Id == in.Pid {
|
||||
err = gerror.New("上级部门不能是自己")
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
type DeptEditModel struct{}
|
||||
|
||||
// DeptUpdateFields 修改数据字段过滤
|
||||
type DeptUpdateFields struct {
|
||||
Id int64 `json:"id" description:"部门ID"`
|
||||
Pid int64 `json:"pid" description:"父部门ID"`
|
||||
Name string `json:"name" description:"部门名称"`
|
||||
Code string `json:"code" description:"部门编码"`
|
||||
Type string `json:"type" description:"部门类型"`
|
||||
Leader string `json:"leader" description:"负责人"`
|
||||
Phone string `json:"phone" description:"联系电话"`
|
||||
Email string `json:"email" description:"邮箱"`
|
||||
Level int `json:"level" description:"关系树等级"`
|
||||
Tree string `json:"tree" description:"关系树"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Status int `json:"status" description:"部门状态"`
|
||||
}
|
||||
|
||||
// DeptInsertFields 新增数据字段过滤
|
||||
type DeptInsertFields struct {
|
||||
Pid int64 `json:"pid" description:"父部门ID"`
|
||||
Name string `json:"name" description:"部门名称"`
|
||||
Code string `json:"code" description:"部门编码"`
|
||||
Type string `json:"type" description:"部门类型"`
|
||||
Leader string `json:"leader" description:"负责人"`
|
||||
Phone string `json:"phone" description:"联系电话"`
|
||||
Email string `json:"email" description:"邮箱"`
|
||||
Level int `json:"level" description:"关系树等级"`
|
||||
Tree string `json:"tree" description:"关系树"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Status int `json:"status" description:"部门状态"`
|
||||
}
|
||||
|
||||
// DeptDeleteInp 删除部门类型
|
||||
type DeptDeleteInp struct {
|
||||
Id interface{} `json:"id" v:"required#部门ID不能为空" dc:"部门ID"`
|
||||
}
|
||||
type DeptDeleteModel struct{}
|
||||
|
||||
// DeptViewInp 获取信息
|
||||
type DeptViewInp struct {
|
||||
Id int64 `json:"id" v:"required#部门ID不能为空" dc:"部门ID"`
|
||||
}
|
||||
|
||||
type DeptViewModel struct {
|
||||
entity.AdminDept
|
||||
}
|
||||
|
||||
// DeptListInp 获取列表
|
||||
type DeptListInp struct {
|
||||
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 树
|
||||
type DeptTree struct {
|
||||
entity.AdminDept
|
||||
Label string `json:"label" dc:"标签"`
|
||||
Value int64 `json:"value" dc:"键值"`
|
||||
Children []*DeptTree `json:"children"`
|
||||
}
|
||||
|
||||
type DeptListModel struct {
|
||||
List []*entity.AdminDept `json:"list"`
|
||||
Ids []int64 `json:"ids"`
|
||||
}
|
||||
|
||||
// DeptStatusInp 更新部门状态
|
||||
type DeptStatusInp struct {
|
||||
entity.AdminDept
|
||||
}
|
||||
|
||||
func (in *DeptStatusInp) 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 DeptStatusModel struct{}
|
||||
|
||||
type DeptOptionInp struct {
|
||||
form.PageReq
|
||||
}
|
||||
|
||||
type DeptOptionModel struct {
|
||||
List []*DeptTree `json:"list"`
|
||||
}
|
||||
|
||||
// DeptTreeOption 关系树选项
|
||||
type DeptTreeOption struct {
|
||||
Id int64 `json:"id" dc:"部门ID"`
|
||||
Pid int64 `json:"pid" dc:"父部门ID"`
|
||||
Name string `json:"name" dc:"部门名称"`
|
||||
Children []tree.Node `json:"children" dc:"子节点"`
|
||||
}
|
||||
|
||||
// ID 获取节点ID
|
||||
func (t *DeptTreeOption) ID() int64 {
|
||||
return t.Id
|
||||
}
|
||||
|
||||
// PID 获取父级节点ID
|
||||
func (t *DeptTreeOption) PID() int64 {
|
||||
return t.Pid
|
||||
}
|
||||
|
||||
// SetChildren 设置子节点数据
|
||||
func (t *DeptTreeOption) SetChildren(children []tree.Node) {
|
||||
t.Children = children
|
||||
}
|
||||
@@ -0,0 +1,338 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/library/contexts"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
"hotgo/utility/validate"
|
||||
)
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
type GetIdByCodeModel struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
// MemberProfileInp 获取指定用户资料
|
||||
type MemberProfileInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type MemberProfileModel struct {
|
||||
PostGroup string `json:"postGroup" dc:"岗位名称"`
|
||||
RoleGroup string `json:"roleGroup" dc:"角色名称"`
|
||||
User *MemberViewModel `json:"member" dc:"用户基本信息"`
|
||||
SysDept *DeptViewModel `json:"sysDept" dc:"部门信息"`
|
||||
SysRoles []*RoleListModel `json:"sysRoles" dc:"角色列表"`
|
||||
PostIds int64 `json:"postIds" dc:"当前岗位"`
|
||||
RoleIds int64 `json:"roleIds" dc:"当前角色"`
|
||||
}
|
||||
|
||||
// MemberUpdateProfileInp 更新用户资料
|
||||
type MemberUpdateProfileInp struct {
|
||||
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 `json:"id" dc:"用户ID"`
|
||||
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 `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
}
|
||||
|
||||
type LoginMemberInfoModel struct {
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
DeptName string `json:"deptName" dc:"所属部门"`
|
||||
RoleName string `json:"roleName" dc:"所属角色"`
|
||||
Permissions []string `json:"permissions" dc:"角色信息"`
|
||||
DeptType string `json:"deptType" dc:"部门类型"`
|
||||
DeptId int64 `json:"-" dc:"部门ID"`
|
||||
RoleId int64 `json:"-" dc:"角色ID"`
|
||||
Username string `json:"username" dc:"用户名"`
|
||||
RealName string `json:"realName" dc:"姓名"`
|
||||
Avatar string `json:"avatar" dc:"头像"`
|
||||
Balance float64 `json:"balance" dc:"余额"`
|
||||
Integral float64 `json:"integral" dc:"积分"`
|
||||
Sex int `json:"sex" dc:"性别"`
|
||||
Qq string `json:"qq" dc:"qq"`
|
||||
Email string `json:"email" dc:"邮箱"`
|
||||
Mobile string `json:"mobile" dc:"手机号码"`
|
||||
Birthday *gtime.Time `json:"birthday" dc:"生日"`
|
||||
CityId int64 `json:"cityId" dc:"城市编码"`
|
||||
Address string `json:"address" dc:"联系地址"`
|
||||
Cash *MemberCash `json:"cash" dc:"收款信息"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
OpenId string `json:"openId" dc:"本次登录的openId"` // 区别与绑定的微信openid
|
||||
InviteCode string `json:"inviteCode" dc:"邀请码"`
|
||||
*MemberLoginStatModel
|
||||
}
|
||||
|
||||
// MemberEditInp 修改用户
|
||||
type MemberEditInp struct {
|
||||
Id int64 `json:"id" dc:"管理员ID"`
|
||||
RoleId int64 `json:"roleId" v:"required#角色不能为空" dc:"角色ID"`
|
||||
PostIds []int64 `json:"postIds" dc:"岗位ID"`
|
||||
DeptId int64 `json:"deptId" v:"required#部门不能为空" dc:"部门ID"`
|
||||
Username string `json:"username" v:"required#账号不能为空" dc:"帐号"`
|
||||
PasswordHash string `json:"passwordHash" dc:"密码hash"`
|
||||
Password string `json:"password" dc:"密码"`
|
||||
RealName string `json:"realName" dc:"真实姓名"`
|
||||
Avatar string `json:"avatar" dc:"头像"`
|
||||
Sex int `json:"sex" dc:"性别"`
|
||||
Qq string `json:"qq" dc:"qq"`
|
||||
Email string `json:"email" dc:"邮箱"`
|
||||
Birthday *gtime.Time `json:"birthday" dc:"生日"`
|
||||
ProvinceId int `json:"provinceId" dc:"省"`
|
||||
CityId int `json:"cityId" dc:"城市"`
|
||||
AreaId int `json:"areaId" dc:"地区"`
|
||||
Address string `json:"address" dc:"默认地址"`
|
||||
Mobile string `json:"mobile" dc:"手机号码"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
}
|
||||
|
||||
// MemberAddInp 新增用户
|
||||
type MemberAddInp struct {
|
||||
*MemberEditInp
|
||||
Salt string `json:"salt" dc:"密码盐"`
|
||||
Pid int64 `json:"pid" dc:"上级ID"`
|
||||
Level int `json:"level" dc:"等级"`
|
||||
Tree string `json:"tree" dc:"关系树"`
|
||||
InviteCode string `json:"inviteCode" dc:"邀请码"`
|
||||
}
|
||||
|
||||
func (in *MemberEditInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Id < 1 || in.Password != "" {
|
||||
if err := g.Validator().
|
||||
Rules("length:6,16").
|
||||
Messages("新密码不能为空#新密码需在6~16之间").
|
||||
Data(in.Password).Run(ctx); err != nil {
|
||||
return err.Current()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type MemberEditModel struct{}
|
||||
|
||||
// VerifyUniqueInp 验证管理员唯一属性
|
||||
type VerifyUniqueInp struct {
|
||||
Id int64
|
||||
Where g.Map
|
||||
}
|
||||
|
||||
// MemberDeleteInp 删除用户
|
||||
type MemberDeleteInp struct {
|
||||
Id interface{} `json:"id" v:"required#用户ID不能为空" dc:"用户ID"`
|
||||
}
|
||||
|
||||
type MemberDeleteModel struct{}
|
||||
|
||||
// MemberViewInp 获取用户信息
|
||||
type MemberViewInp struct {
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
}
|
||||
|
||||
type MemberViewModel struct {
|
||||
entity.AdminMember
|
||||
DeptName string `json:"deptName" dc:"所属部门"`
|
||||
RoleName string `json:"roleName" dc:"所属角色"`
|
||||
}
|
||||
|
||||
// MemberListInp 获取用户列表
|
||||
type MemberListInp struct {
|
||||
form.PageReq
|
||||
form.StatusReq
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
Pid int64 `json:"pid" dc:"上级ID"`
|
||||
RoleId int `json:"roleId" dc:"角色ID"`
|
||||
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" dc:"所属部门"`
|
||||
RoleName string `json:"roleName" dc:"所属角色"`
|
||||
PostIds []int64 `json:"postIds" dc:"岗位"`
|
||||
DeptId int64 `json:"deptId" dc:"部门ID"`
|
||||
}
|
||||
|
||||
// MemberCash 用户提现配置
|
||||
type MemberCash struct {
|
||||
Name string `json:"name" dc:"收款人姓名"`
|
||||
Account string `json:"account" dc:"收款账户"`
|
||||
PayeeCode string `json:"payeeCode" dc:"收款码"`
|
||||
}
|
||||
|
||||
// MemberStatusInp 更新状态
|
||||
type MemberStatusInp struct {
|
||||
entity.AdminMember
|
||||
}
|
||||
|
||||
func (in *MemberStatusInp) 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 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:"头像"`
|
||||
}
|
||||
|
||||
// MemberAddBalanceInp 增加余额
|
||||
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:"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) {
|
||||
if in.Num <= 0 {
|
||||
err = gerror.New("操作数量必须大于0")
|
||||
return
|
||||
}
|
||||
|
||||
if in.OperateMode == 1 {
|
||||
// 加款
|
||||
in.SelfNum = -in.Num
|
||||
in.SelfCreditGroup = consts.CreditGroupOpIncr
|
||||
in.OtherNum = in.Num
|
||||
in.OtherCreditGroup = consts.CreditGroupIncr
|
||||
in.Remark = fmt.Sprintf("增加余额:%v", in.OtherNum)
|
||||
} else {
|
||||
// 扣款
|
||||
in.SelfNum = in.Num
|
||||
in.SelfCreditGroup = consts.CreditGroupOpDecr
|
||||
in.OtherNum = -in.Num
|
||||
in.OtherCreditGroup = consts.CreditGroupDecr
|
||||
in.Remark = fmt.Sprintf("扣除余额:%v", in.OtherNum)
|
||||
}
|
||||
|
||||
in.AppId = contexts.GetModule(ctx)
|
||||
in.AddonsName = contexts.GetAddonName(ctx)
|
||||
return
|
||||
}
|
||||
|
||||
type MemberAddBalanceModel struct{}
|
||||
|
||||
// MemberAddIntegralInp 增加积分
|
||||
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:"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) {
|
||||
if in.Num <= 0 {
|
||||
err = gerror.New("操作数量必须大于0")
|
||||
return
|
||||
}
|
||||
|
||||
if in.OperateMode == 1 {
|
||||
// 加款
|
||||
in.SelfNum = -in.Num
|
||||
in.SelfCreditGroup = consts.CreditGroupOpIncr
|
||||
in.OtherNum = in.Num
|
||||
in.OtherCreditGroup = consts.CreditGroupIncr
|
||||
in.Remark = fmt.Sprintf("增加积分:%v", in.OtherNum)
|
||||
} else {
|
||||
// 扣款
|
||||
in.SelfNum = in.Num
|
||||
in.SelfCreditGroup = consts.CreditGroupOpDecr
|
||||
in.OtherNum = -in.Num
|
||||
in.OtherCreditGroup = consts.CreditGroupDecr
|
||||
in.Remark = fmt.Sprintf("扣除积分:%v", in.OtherNum)
|
||||
}
|
||||
|
||||
in.AppId = contexts.GetModule(ctx)
|
||||
in.AddonsName = contexts.GetAddonName(ctx)
|
||||
return
|
||||
}
|
||||
|
||||
type MemberAddIntegralModel struct{}
|
||||
@@ -0,0 +1,147 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @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"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// MenuEditInp 修改/新增菜单
|
||||
type MenuEditInp struct {
|
||||
entity.AdminMenu
|
||||
}
|
||||
|
||||
func (in *MenuEditInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Title == "" {
|
||||
err = gerror.New("菜单名称不能为空")
|
||||
return
|
||||
}
|
||||
if in.Type != 3 && in.Path == "" {
|
||||
err = gerror.New("路由地址不能为空")
|
||||
return
|
||||
}
|
||||
if in.Name == "" {
|
||||
err = gerror.New("路由别名不能为空")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type MenuEditModel struct{}
|
||||
|
||||
// MenuDeleteInp 删除菜单
|
||||
type MenuDeleteInp struct {
|
||||
Id interface{} `json:"id" v:"required#菜单ID不能为空" dc:"菜单ID"`
|
||||
}
|
||||
|
||||
func (in *MenuDeleteInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type MenuDeleteModel struct{}
|
||||
|
||||
// MenuListInp 获取菜单列表
|
||||
type MenuListInp struct {
|
||||
form.PageReq
|
||||
Pid int64 `json:"pid" dc:"父ID"`
|
||||
}
|
||||
|
||||
func (in *MenuListInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// MenuSearchListInp 查询菜单列表
|
||||
type MenuSearchListInp struct {
|
||||
Name string `json:"name" dc:"菜单名称"`
|
||||
form.StatusReq
|
||||
}
|
||||
|
||||
func (in *MenuSearchListInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type MenuSearchListModel []*model.TreeMenu
|
||||
|
||||
// MenuTree 树
|
||||
type MenuTree struct {
|
||||
entity.AdminMenu
|
||||
Key int64 `json:"key" `
|
||||
Label string `json:"label" dc:"标签"`
|
||||
Children []*MenuTree `json:"children"`
|
||||
}
|
||||
|
||||
type MenuListModel struct {
|
||||
List []*MenuTree `json:"list"`
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// 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:"子菜单"`
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @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"
|
||||
)
|
||||
|
||||
// NoticeMaxSortInp 最大排序
|
||||
type NoticeMaxSortInp struct {
|
||||
Id int64
|
||||
}
|
||||
|
||||
type NoticeMaxSortModel struct {
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
// NoticeEditInp 修改/新增
|
||||
type NoticeEditInp struct {
|
||||
entity.AdminNotice
|
||||
Receiver []int64 `json:"receiver" dc:"接收者"`
|
||||
SenderAvatar string `json:"senderAvatar" dc:"发送者头像"`
|
||||
}
|
||||
|
||||
type NoticeEditModel struct{}
|
||||
|
||||
// NoticeDeleteInp 删除字典类型
|
||||
type NoticeDeleteInp struct {
|
||||
Id interface{} `json:"id" v:"required#公告ID不能为空" dc:"公告ID"`
|
||||
}
|
||||
|
||||
type NoticeDeleteModel struct{}
|
||||
|
||||
// NoticeViewInp 获取信息
|
||||
type NoticeViewInp struct {
|
||||
Id int64 `json:"id" v:"required#公告ID不能为空" dc:"公告ID"`
|
||||
}
|
||||
|
||||
type NoticeViewModel struct {
|
||||
entity.AdminNotice
|
||||
}
|
||||
|
||||
// NoticeListInp 获取列表
|
||||
type NoticeListInp struct {
|
||||
form.PageReq
|
||||
form.StatusReq
|
||||
Title string
|
||||
Content string
|
||||
Type int64
|
||||
}
|
||||
|
||||
type NoticeListModel struct {
|
||||
entity.AdminNotice
|
||||
ReadCount float64 `json:"readCount" dc:"阅读次数"`
|
||||
ReceiverGroup []form.AvatarGroup `json:"receiverGroup" dc:"接收人头像组"`
|
||||
}
|
||||
|
||||
// NoticeStatusInp 更新状态
|
||||
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:"拉取最大数量限制"`
|
||||
}
|
||||
|
||||
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:"消息类型"`
|
||||
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:"是否已读"`
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @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/library/dict"
|
||||
"hotgo/internal/library/hgorm/hook"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
"hotgo/internal/model/input/payin"
|
||||
)
|
||||
|
||||
// OrderAcceptRefundInp 受理申请退款
|
||||
type OrderAcceptRefundInp struct {
|
||||
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
RejectRefundReason string `json:"rejectRefundReason" dc:"拒绝退款原因"`
|
||||
Status int64 `json:"status" dc:"状态"`
|
||||
Remark string `json:"remark" dc:"退款备注"`
|
||||
}
|
||||
|
||||
func (in *OrderAcceptRefundInp) Filter(ctx context.Context) (err error) {
|
||||
if !dict.HasOptionKey(consts.OrderStatusOptions, in.Status) {
|
||||
err = gerror.Newf("订单状态不正确")
|
||||
return
|
||||
}
|
||||
|
||||
if in.Status == consts.OrderStatusReturnReject && in.Remark == "" {
|
||||
in.Remark = "退款申请被拒绝"
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type OrderAcceptRefundModel struct {
|
||||
}
|
||||
|
||||
// OrderApplyRefundInp 申请退款
|
||||
type OrderApplyRefundInp struct {
|
||||
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
RefundReason string `json:"refundReason" v:"required#退款原因不能为空" dc:"退款原因"`
|
||||
}
|
||||
|
||||
func (in *OrderApplyRefundInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type OrderApplyRefundModel struct {
|
||||
}
|
||||
|
||||
// OrderCreateInp 创建充值订单
|
||||
type OrderCreateInp struct {
|
||||
PayType string `json:"payType" dc:"支付方式"`
|
||||
TradeType string `json:"tradeType" dc:"交易类型"`
|
||||
OrderType string `json:"orderType" dc:"订单类型"`
|
||||
ProductId int64 `json:"productId" dc:"产品id"`
|
||||
Money float64 `json:"money" dc:"充值金额"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
ReturnUrl string `json:"returnUrl" dc:"买家付款成功跳转地址"`
|
||||
}
|
||||
|
||||
func (in *OrderCreateInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type OrderCreateModel struct {
|
||||
Order *payin.CreateOrderModel `json:"order"`
|
||||
}
|
||||
|
||||
// OrderEditInp 修改/新增充值订单
|
||||
type OrderEditInp struct {
|
||||
entity.AdminOrder
|
||||
}
|
||||
|
||||
func (in *OrderEditInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type OrderEditModel struct{}
|
||||
|
||||
// OrderDeleteInp 删除充值订单
|
||||
type OrderDeleteInp struct {
|
||||
Id interface{} `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
}
|
||||
|
||||
func (in *OrderDeleteInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type OrderDeleteModel struct{}
|
||||
|
||||
// OrderViewInp 获取指定充值订单信息
|
||||
type OrderViewInp struct {
|
||||
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
}
|
||||
|
||||
func (in *OrderViewInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type OrderViewModel struct {
|
||||
entity.AdminOrder
|
||||
}
|
||||
|
||||
// OrderListInp 获取充值订单列表
|
||||
type OrderListInp struct {
|
||||
form.PageReq
|
||||
MemberId uint64 `json:"memberId" dc:"用户id"`
|
||||
OrderSn string `json:"orderSn" dc:"业务订单号"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
PayLogOutTradeNo string `json:"payLogOutTradeNo" dc:"商户订单号"`
|
||||
ComplexMemberId []string `json:"complexMemberId" dc:"下单用户"`
|
||||
}
|
||||
|
||||
func (in *OrderListInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type OrderListModel struct {
|
||||
entity.AdminOrder
|
||||
OutTradeNo string `json:"payLogOutTradeNo" dc:"商户订单号"`
|
||||
PayType string `json:"payLogPayType" dc:"支付类型"`
|
||||
MemberBySumma *hook.MemberSumma `json:"memberBySumma" dc:"下单用户信息"`
|
||||
}
|
||||
|
||||
// OrderExportModel 导出充值订单
|
||||
type OrderExportModel struct {
|
||||
Id int64 `json:"id" dc:"主键"`
|
||||
MemberId uint64 `json:"memberId" dc:"用户id"`
|
||||
OrderType string `json:"orderType" dc:"订单类型"`
|
||||
ProductId int64 `json:"productId" dc:"产品id"`
|
||||
OrderSn string `json:"orderSn" dc:"关联订单号"`
|
||||
Money float64 `json:"money" dc:"充值金额"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"`
|
||||
}
|
||||
|
||||
// OrderStatusInp 更新充值订单状态
|
||||
type OrderStatusInp struct {
|
||||
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
}
|
||||
|
||||
func (in *OrderStatusInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type OrderStatusModel struct{}
|
||||
@@ -0,0 +1,102 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @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.StatusReq
|
||||
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 {
|
||||
entity.AdminPost
|
||||
}
|
||||
|
||||
// PostViewInp 获取信息
|
||||
type PostViewInp struct {
|
||||
Id string `json:"id" v:"required#岗位ID不能为空" description:"岗位ID"`
|
||||
}
|
||||
|
||||
type PostViewModel struct {
|
||||
entity.AdminPost
|
||||
}
|
||||
|
||||
// PostMaxSortInp 最大排序
|
||||
type PostMaxSortInp struct {
|
||||
Id int64 `json:"id" description:"岗位ID"`
|
||||
}
|
||||
|
||||
type PostMaxSortModel struct {
|
||||
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{} `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{}
|
||||
@@ -0,0 +1,154 @@
|
||||
// Package adminin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @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/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
)
|
||||
|
||||
// GetPermissionsInp 获取指定角色的菜单权限
|
||||
type GetPermissionsInp struct {
|
||||
RoleId int64 `json:"id"`
|
||||
}
|
||||
|
||||
type GetPermissionsModel struct {
|
||||
MenuIds []int64 `json:"menuIds"`
|
||||
}
|
||||
|
||||
// UpdatePermissionsInp 更新指定角色的菜单权限
|
||||
type UpdatePermissionsInp struct {
|
||||
RoleId int64 `json:"id"`
|
||||
MenuIds []int64 `json:"menuIds"`
|
||||
}
|
||||
|
||||
// RoleDeleteInp 删除角色
|
||||
type RoleDeleteInp struct {
|
||||
Id int64 `json:"id" v:"required"`
|
||||
}
|
||||
|
||||
func (in *RoleDeleteInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Id <= 0 {
|
||||
err = gerror.New("ID不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// RoleEditInp 获取列表
|
||||
type RoleEditInp struct {
|
||||
entity.AdminRole
|
||||
}
|
||||
|
||||
func (in *RoleEditInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Name == "" {
|
||||
err = gerror.New("名称不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
if in.Key == "" {
|
||||
err = gerror.New("编码不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
if in.Id > 0 && in.Id == in.Pid {
|
||||
err = gerror.New("上级角色不能是自己")
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// RoleUpdateFields 修改数据字段过滤
|
||||
type RoleUpdateFields struct {
|
||||
Id int64 `json:"id" description:"角色ID"`
|
||||
Name string `json:"name" description:"角色名称"`
|
||||
Key string `json:"key" description:"角色权限字符串"`
|
||||
DataScope int `json:"dataScope" description:"数据范围"`
|
||||
CustomDept *gjson.Json `json:"customDept" description:"自定义部门权限"`
|
||||
Pid int64 `json:"pid" description:"上级角色ID"`
|
||||
Level int `json:"level" description:"关系树等级"`
|
||||
Tree string `json:"tree" description:"关系树"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Status int `json:"status" description:"角色状态"`
|
||||
}
|
||||
|
||||
// RoleInsertFields 新增数据字段过滤
|
||||
type RoleInsertFields struct {
|
||||
Name string `json:"name" description:"角色名称"`
|
||||
Key string `json:"key" description:"角色权限字符串"`
|
||||
DataScope int `json:"dataScope" description:"数据范围"`
|
||||
CustomDept *gjson.Json `json:"customDept" description:"自定义部门权限"`
|
||||
Pid int64 `json:"pid" description:"上级角色ID"`
|
||||
Level int `json:"level" description:"关系树等级"`
|
||||
Tree string `json:"tree" description:"关系树"`
|
||||
Remark string `json:"remark" description:"备注"`
|
||||
Sort int `json:"sort" description:"排序"`
|
||||
Status int `json:"status" description:"角色状态"`
|
||||
}
|
||||
|
||||
// RoleListInp 获取列表
|
||||
type RoleListInp struct {
|
||||
form.PageReq
|
||||
}
|
||||
|
||||
type RoleTree struct {
|
||||
entity.AdminRole
|
||||
Label string `json:"label" dc:"标签"`
|
||||
Value int64 `json:"value" dc:"键值"`
|
||||
Children []*RoleTree `json:"children" dc:"子级"`
|
||||
}
|
||||
|
||||
type RoleListModel struct {
|
||||
List []*RoleTree `json:"list"`
|
||||
}
|
||||
|
||||
// RoleMemberListInp 查询列表
|
||||
type RoleMemberListInp struct {
|
||||
form.PageReq
|
||||
|
||||
form.StatusReq
|
||||
Role int `json:"role" dc:"角色ID"`
|
||||
DeptId int `json:"deptId" dc:"部门ID"`
|
||||
Mobile int `json:"mobile" dc:"手机号"`
|
||||
Username string `json:"username" dc:"用户名"`
|
||||
RealName string `json:"realName" dc:"真实姓名"`
|
||||
StartTime string `json:"start_time" dc:"开始时间"`
|
||||
EndTime string `json:"end_time" dc:"结束时间"`
|
||||
Name string `json:"name" dc:"岗位名称"`
|
||||
Code string `json:"code" dc:"岗位编码"`
|
||||
}
|
||||
|
||||
type RoleMemberListModel []*MemberListModel
|
||||
|
||||
// MenuRoleListInp 查询角色菜单列表
|
||||
type MenuRoleListInp struct {
|
||||
RoleId int64
|
||||
}
|
||||
type MenuRoleListModel struct {
|
||||
Menus []*model.LabelTreeMenu `json:"menus" dc:"菜单列表"`
|
||||
CheckedKeys []int64 `json:"checkedKeys" dc:"选择的菜单ID"`
|
||||
}
|
||||
|
||||
// DataScopeEditInp 获取数据权限选项
|
||||
type DataScopeEditInp struct {
|
||||
Id int64 `json:"id" v:"required" dc:"角色ID"`
|
||||
DataScope int `json:"dataScope" v:"required" dc:"数据范围"`
|
||||
CustomDept []int64 `json:"customDept" dc:"自定义部门权限"`
|
||||
}
|
||||
|
||||
func (in *DataScopeEditInp) Filter(ctx context.Context) (err error) {
|
||||
if in.Id <= 0 {
|
||||
return gerror.New("角色ID不正确!")
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package adminin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"hotgo/utility/simple"
|
||||
)
|
||||
|
||||
// RegisterInp 账号注册
|
||||
type RegisterInp struct {
|
||||
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
|
||||
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
Mobile string `json:"mobile" v:"required|phone-loose#手机号不能为空|手机号格式不正确" dc:"手机号"`
|
||||
Code string `json:"code" v:"required#验证码不能为空" dc:"验证码"`
|
||||
InviteCode string `json:"inviteCode" dc:"邀请码"`
|
||||
}
|
||||
|
||||
func (in *RegisterInp) Filter(ctx context.Context) (err error) {
|
||||
// 解密密码
|
||||
password, err := simple.DecryptText(in.Password)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = g.Validator().Data(password).Rules("password").Messages("密码长度在6~18之间").Run(ctx); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
in.Password = password
|
||||
return
|
||||
}
|
||||
|
||||
// LoginModel 统一登录响应
|
||||
type LoginModel struct {
|
||||
Id int64 `json:"id" dc:"用户ID"`
|
||||
Username string `json:"username" dc:"用户名"`
|
||||
Token string `json:"token" dc:"登录token"`
|
||||
Expires int64 `json:"expires" dc:"登录有效期"`
|
||||
}
|
||||
|
||||
// AccountLoginInp 账号登录
|
||||
type AccountLoginInp struct {
|
||||
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
|
||||
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
Cid string `json:"cid" dc:"验证码ID"`
|
||||
Code string `json:"code" dc:"验证码"`
|
||||
IsLock bool `json:"isLock" dc:"是否为锁屏状态"`
|
||||
}
|
||||
|
||||
// MobileLoginInp 手机号登录
|
||||
type MobileLoginInp struct {
|
||||
Mobile string `json:"mobile" v:"required|phone-loose#手机号不能为空|手机号格式不正确" dc:"手机号"`
|
||||
Code string `json:"code" v:"required#验证码不能为空" dc:"验证码"`
|
||||
}
|
||||
|
||||
// MemberLoginPermissions 登录用户角色信息
|
||||
type MemberLoginPermissions []string
|
||||
|
||||
// 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"`
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Package commonin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package commonin
|
||||
|
||||
// WechatAuthorizeInp 微信用户授权
|
||||
type WechatAuthorizeInp struct {
|
||||
Type string `json:"type" v:"required#授权类型不能为空" dc:"授权类型"`
|
||||
SyncRedirect string `json:"syncRedirect" v:"required#同步跳转地址不能为空" dc:"同步跳转地址"`
|
||||
}
|
||||
|
||||
type WechatAuthorizeModel struct{}
|
||||
|
||||
// WechatAuthorizeCallInp 微信用户授权回调
|
||||
type WechatAuthorizeCallInp struct {
|
||||
Code string `json:"code" dc:"code作为换取access_token的票据"`
|
||||
State string `json:"state" dc:"state"`
|
||||
}
|
||||
|
||||
type WechatAuthorizeCallModel struct{}
|
||||
@@ -0,0 +1,30 @@
|
||||
// Package form
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package form
|
||||
|
||||
import "hotgo/internal/consts"
|
||||
|
||||
// StatusReq 通用状态查询
|
||||
type StatusReq struct {
|
||||
Status int `json:"status" v:"in:-1,0,1,2,3#输入的状态是无效的" dc:"状态"`
|
||||
}
|
||||
|
||||
// SwitchReq 更新开关状态
|
||||
type SwitchReq struct {
|
||||
Key string `json:"key" v:"required#测试ID不能为空" dc:"开关字段"`
|
||||
Value int `json:"value" v:"in:1,2#输入的开关值是无效的" dc:"更新值"`
|
||||
}
|
||||
|
||||
// AvatarGroup 头像组
|
||||
type AvatarGroup struct {
|
||||
Name string `json:"name" dc:"姓名"`
|
||||
Src string `json:"src" dc:"头像地址"`
|
||||
}
|
||||
|
||||
// DefaultMaxSort 默认最大排序
|
||||
func DefaultMaxSort(baseSort int) int {
|
||||
return baseSort + consts.MaxSortIncr
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
// Package form
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
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:"page@min:1#页码最小值不能低于1" dc:"当前页码"`
|
||||
PerPage int `json:"pageSize" example:"1" d:"10" v:"pageSize@min:1|max:200#每页数量最小值不能低于1|每页数量最大值不能大于200" dc:"每页数量"`
|
||||
Pagination bool `json:"pagination" d:"true" 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:"分页个数"`
|
||||
TotalCount int `json:"totalCount" example:"0" dc:"数据总行数"`
|
||||
}
|
||||
|
||||
// Pack 打包分页数据
|
||||
func (res *PageRes) Pack(req ReqPageFunc, totalCount int) {
|
||||
res.TotalCount = totalCount
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// Package form
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
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)
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user