mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-14 21:23:47 +08:00
feat 调整 mysql 、pgsql 初始化数据; 完善pgsql 兼容性,适配代码生成逻辑
This commit is contained in:
@@ -16,7 +16,7 @@ type SysAddonsConfig struct {
|
||||
AddonName any // 插件名称
|
||||
Group any // 分组
|
||||
Name any // 参数名称
|
||||
Type any // 键值类型:string,int,uint,bool,datetime,date
|
||||
Type any // 键值类型:string,int,uint,bool,TIMESTAMP,date
|
||||
Key any // 参数键名
|
||||
Value any // 参数键值
|
||||
DefaultValue any // 默认值
|
||||
|
||||
@@ -15,7 +15,7 @@ type SysConfig struct {
|
||||
Id any // 配置ID
|
||||
Group any // 配置分组
|
||||
Name any // 参数名称
|
||||
Type any // 键值类型:string,int,uint,bool,datetime,date
|
||||
Type any // 键值类型:string,int,uint,bool,TIMESTAMP,date
|
||||
Key any // 参数键名
|
||||
Value any // 参数键值
|
||||
DefaultValue any // 默认值
|
||||
|
||||
@@ -15,7 +15,7 @@ type SysDictData struct {
|
||||
Id any // 字典数据ID
|
||||
Label any // 字典标签
|
||||
Value any // 字典键值
|
||||
ValueType any // 键值数据类型:string,int,uint,bool,datetime,date
|
||||
ValueType any // 键值数据类型:string,int,uint,bool,TIMESTAMP,date
|
||||
Type any // 字典类型
|
||||
ListClass any // 表格回显样式
|
||||
IsDefault any // 是否为系统默认
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
// PayRefund is the golang structure for table pay_refund.
|
||||
type PayRefund struct {
|
||||
Id uint64 `json:"id" orm:"id" description:"主键ID"`
|
||||
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:"业务订单号"`
|
||||
|
||||
@@ -14,7 +14,7 @@ type SysAddonsConfig struct {
|
||||
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,datetime,date"`
|
||||
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:"默认值"`
|
||||
|
||||
@@ -13,7 +13,7 @@ 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 uint64 `json:"cateId" orm:"cate_id" description:"上传分类"`
|
||||
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:"上传类型"`
|
||||
|
||||
@@ -13,7 +13,7 @@ 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,datetime,date"`
|
||||
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:"默认值"`
|
||||
|
||||
@@ -13,7 +13,7 @@ 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,datetime,date"`
|
||||
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:"是否为系统默认"`
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
// SysGenCodes is the golang structure for table sys_gen_codes.
|
||||
type SysGenCodes struct {
|
||||
Id int64 `json:"id" orm:"id" description:"生成ID"`
|
||||
GenType uint `json:"genType" orm:"gen_type" description:"生成类型"`
|
||||
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:"配置选项"`
|
||||
|
||||
@@ -14,7 +14,7 @@ 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 uint64 `json:"merchantId" orm:"merchant_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:"访问模块"`
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Package sysin
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2024 HotGo CLI
|
||||
// @Copyright Copyright (c) 2025 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
// @AutoGenerate Version 2.15.7
|
||||
// @AutoGenerate Version 2.18.6
|
||||
package sysin
|
||||
|
||||
import (
|
||||
@@ -55,22 +55,18 @@ func (in *CurdDemoEditInp) Filter(ctx context.Context) (err error) {
|
||||
if err := g.Validator().Rules("required").Data(in.Title).Messages("标题不能为空").Run(ctx); err != nil {
|
||||
return err.Current()
|
||||
}
|
||||
|
||||
// 验证描述
|
||||
if err := g.Validator().Rules("required").Data(in.Description).Messages("描述不能为空").Run(ctx); err != nil {
|
||||
return err.Current()
|
||||
}
|
||||
|
||||
// 验证内容
|
||||
if err := g.Validator().Rules("required").Data(in.Content).Messages("内容不能为空").Run(ctx); err != nil {
|
||||
return err.Current()
|
||||
}
|
||||
|
||||
// 验证排序
|
||||
if err := g.Validator().Rules("required").Data(in.Sort).Messages("排序不能为空").Run(ctx); err != nil {
|
||||
return err.Current()
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -100,6 +96,7 @@ type CurdDemoViewModel struct {
|
||||
entity.SysGenCurdDemo
|
||||
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"`
|
||||
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者摘要信息"`
|
||||
DeletedBySumma *hook.MemberSumma `json:"deletedBySumma" dc:"删除者摘要信息"`
|
||||
}
|
||||
|
||||
// CurdDemoListInp 获取CURD列表列表
|
||||
@@ -109,6 +106,7 @@ type CurdDemoListInp struct {
|
||||
Title string `json:"title" dc:"标题"`
|
||||
Description string `json:"description" dc:"描述"`
|
||||
CreatedBy string `json:"createdBy" dc:"创建者"`
|
||||
DeletedBy string `json:"deletedBy" dc:"删除者"`
|
||||
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
TestCategoryName string `json:"testCategoryName" dc:"关联分类"`
|
||||
}
|
||||
@@ -129,6 +127,8 @@ type CurdDemoListModel struct {
|
||||
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
|
||||
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者摘要信息"`
|
||||
DeletedBy int64 `json:"deletedBy" dc:"删除者"`
|
||||
DeletedBySumma *hook.MemberSumma `json:"deletedBySumma" dc:"删除者摘要信息"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"修改时间"`
|
||||
TestCategoryName string `json:"testCategoryName" dc:"关联分类"`
|
||||
@@ -146,6 +146,7 @@ type CurdDemoExportModel struct {
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"创建者"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
|
||||
DeletedBy int64 `json:"deletedBy" dc:"删除者"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
TestCategoryName string `json:"testCategoryName" dc:"关联分类"`
|
||||
}
|
||||
@@ -197,4 +198,4 @@ func (in *CurdDemoSwitchInp) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type CurdDemoSwitchModel struct{}
|
||||
type CurdDemoSwitchModel struct{}
|
||||
Reference in New Issue
Block a user