[feat] 移除 ResFieldByMap, ResFieldByAnys 类型

This commit is contained in:
what 2023-06-23 00:10:24 +08:00
parent 88ed380018
commit 6ccef0fbb8
25 changed files with 416 additions and 459 deletions

View File

@ -1,45 +1,56 @@
package base package base
import ( type DataListOrder struct {
"git.fsdpf.net/go/contracts/res_type" Sql string `json:"sql"`
) Type string `json:"type"`
Direction string `json:"direction"`
}
type DataListGroup struct {
Sql string `json:"sql"`
Type string `json:"type"`
}
type XlsxImportConfig struct {
Mode int `json:"mode"`
UniqueImportFields []string `json:"uniqueImportFields"`
}
type DataList struct { type DataList struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
ResourceUuid string `db:"resource_uuid"` // 所属资源UUID ResourceUuid string `db:"resource_uuid"` // 所属资源UUID
Code string `db:"code"` // 列表标识 Code string `db:"code"` // 列表标识
Name string `db:"name"` // 列表名称 Name string `db:"name"` // 列表名称
Title string `db:"title"` // 布局标题 Title string `db:"title"` // 布局标题
PrimaryKey string `db:"primaryKey"` // 主键标识 PrimaryKey string `db:"primaryKey"` // 主键标识
Layout string `db:"layout"` // 主键标识 Layout string `db:"layout"` // 主键标识
IsOperationColumn bool `db:"isOperationColumn"` // 是否显示操作栏,1是,0否 IsOperationColumn bool `db:"isOperationColumn"` // 是否显示操作栏,1是,0否
OperationColumnWidth int `db:"operationColumnWidth"` // 操作列宽度 OperationColumnWidth int `db:"operationColumnWidth"` // 操作列宽度
IsPaginate bool `db:"isPaginate"` // 是否分页 IsPaginate bool `db:"isPaginate"` // 是否分页
IsTreeData bool `db:"isTreeData"` // 是否使用树形列表 IsTreeData bool `db:"isTreeData"` // 是否使用树形列表
TreeDataConfig res_type.ResFieldByMap `db:"treeDataConfig"` // 树形列表配置 TreeDataConfig map[string]any `db:"treeDataConfig"` // 树形列表配置
IsExpandedRow string `db:"isExpandedRow"` // 列表明细控件 IsExpandedRow string `db:"isExpandedRow"` // 列表明细控件
ExpandedRowConfig res_type.ResFieldByMap `db:"expandedRowConfig"` // 列表明细控件配置 ExpandedRowConfig map[string]any `db:"expandedRowConfig"` // 列表明细控件配置
IsTreeSider bool `db:"isTreeSider"` // 是否打开侧边栏侧边栏 IsTreeSider bool `db:"isTreeSider"` // 是否打开侧边栏侧边栏
TreeSiderConfig res_type.ResFieldByMap `db:"treeSiderConfig"` // 侧边栏设置 TreeSiderConfig map[string]any `db:"treeSiderConfig"` // 侧边栏设置
IsDynamicRefresh bool `db:"isDynamicRefresh"` // 是否启用动态刷新 IsDynamicRefresh bool `db:"isDynamicRefresh"` // 是否启用动态刷新
PageSize int `db:"pagesize"` // 分页大小 PageSize int `db:"pagesize"` // 分页大小
IsAuxiliaryPanel bool `db:"isAuxiliaryPanel"` // 是否使用附属面板 IsAuxiliaryPanel bool `db:"isAuxiliaryPanel"` // 是否使用附属面板
AuxiliaryPanelConfig res_type.ResFieldByMap `db:"auxiliaryPanelConfig"` // 附属面板配置 AuxiliaryPanelConfig map[string]any `db:"auxiliaryPanelConfig"` // 附属面板配置
SortConfig res_type.ResFieldByAnys `db:"sortConfig"` // 排序设置 SortConfig []DataListOrder `db:"sortConfig"` // 排序设置
FieldsSort res_type.ResFieldByAnys `db:"fieldsSort"` // 字段排序 FieldsSort []string `db:"fieldsSort"` // 字段排序
GroupConfig res_type.ResFieldByAnys `db:"groupConfig"` // 分组设置 GroupConfig []DataListGroup `db:"groupConfig"` // 分组设置
XlsxFieldsSort res_type.ResFieldByAnys `db:"xlsxFieldsSort"` // 字段排序 XlsxFieldsSort []string `db:"xlsxFieldsSort"` // 字段排序
XlsxImportFieldsSort res_type.ResFieldByAnys `db:"xlsxImportFieldsSort"` // 字段排序 XlsxImportFieldsSort []string `db:"xlsxImportFieldsSort"` // 字段排序
XlsxImportConfig res_type.ResFieldByMap `db:"xlsxImportConfig"` // 导入设置 XlsxImportConfig XlsxImportConfig `db:"xlsxImportConfig"` // 导入设置
TabsSort res_type.ResFieldByAnys `db:"tabsSort"` // 标签排序 TabsSort []string `db:"tabsSort"` // 标签排序
OperationsSort res_type.ResFieldByAnys `db:"operationsSort"` // 按钮排序 OperationsSort []string `db:"operationsSort"` // 按钮排序
FsmConfig res_type.ResFieldByAnys `db:"fsmConfig"` // FSM设置 FsmConfig [][2]any `db:"fsmConfig"` // FSM设置
ApprovalConfig res_type.ResFieldByAnys `db:"approvalConfig"` // 审批设置 ApprovalConfig [][2]any `db:"approvalConfig"` // 审批设置
UniqueImportFields res_type.ResFieldByAnys `db:"uniqueImportFields"` // 导入字段唯一效验 UniqueImportFields []string `db:"uniqueImportFields"` // 导入字段唯一效验
Roles res_type.ResFieldByAnys `db:"roles"` // 列表权限 Roles []string `db:"roles"` // 列表权限
IsAuthDB int `db:"is_auth_db"` // 启用权限过滤 IsAuthDB int `db:"is_auth_db"` // 启用权限过滤
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetDataList func(code string) (DataList, bool) type GetDataList func(code string) (DataList, bool)

View File

@ -1,36 +1,32 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type DataListField struct { type DataListField struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
DataListUuid string `db:"data_list_uuid"` // 所属列表 UUID DataListUuid string `db:"data_list_uuid"` // 所属列表 UUID
Title res_type.ResFieldByString `db:"title"` // 列表标题 Title string `db:"title"` // 列表标题
Code string `db:"code"` // 字段名称 Code string `db:"code"` // 字段名称
CodeResource string `db:"codeResource"` // 字段所属资源 CodeResource string `db:"codeResource"` // 字段所属资源
Alias string `db:"alias"` // 字段别名 Alias string `db:"alias"` // 字段别名
IsExpr bool `db:"isExpr"` // 字段名是否为SQL表达式 IsExpr bool `db:"isExpr"` // 字段名是否为SQL表达式
FieldDataType string `db:"fieldDataType"` // 字段数据类型 FieldDataType string `db:"fieldDataType"` // 字段数据类型
Width int `db:"width"` // 列宽 Width int `db:"width"` // 列宽
IsWidthFixed bool `db:"isWidthFixed"` // 列宽固定 IsWidthFixed bool `db:"isWidthFixed"` // 列宽固定
Fixed bool `db:"fixed"` // 字段冻结 Fixed bool `db:"fixed"` // 字段冻结
Align string `db:"align"` // 对齐方式 Align string `db:"align"` // 对齐方式
IsShow int `db:"isShow"` // 是否显示 IsShow int `db:"isShow"` // 是否显示
WidgetByJs string `db:"widgetByJs"` // 前端数据渲染控件 WidgetByJs string `db:"widgetByJs"` // 前端数据渲染控件
WidgetByJsSetting res_type.ResFieldByMap `db:"widgetByJsSetting"` // 前端数据渲染控件设置参数 WidgetByJsSetting map[string]any `db:"widgetByJsSetting"` // 前端数据渲染控件设置参数
IsSearch bool `db:"isSearch"` // 允许关键字搜索 IsSearch bool `db:"isSearch"` // 允许关键字搜索
IsVirtual bool `db:"isVirtual"` // 是否虚拟字段 IsVirtual bool `db:"isVirtual"` // 是否虚拟字段
IsSort bool `db:"isSort"` // 允许字段排序 IsSort bool `db:"isSort"` // 允许字段排序
EditableByJs string `db:"editableByJs"` // 字段更新组件 EditableByJs string `db:"editableByJs"` // 字段更新组件
EditableByJsSetting res_type.ResFieldByMap `db:"editableByJsSetting"` // 字段更新组件设置 EditableByJsSetting map[string]any `db:"editableByJsSetting"` // 字段更新组件设置
FilterByJs string `db:"filterByJs"` // 字段筛选组件 FilterByJs string `db:"filterByJs"` // 字段筛选组件
FilterByJsSetting res_type.ResFieldByMap `db:"filterByJsSetting"` // 字段筛选组件设置参数 FilterByJsSetting map[string]any `db:"filterByJsSetting"` // 字段筛选组件设置参数
FilterOperator string `db:"filterOperator"` // 字段筛选符号 FilterOperator string `db:"filterOperator"` // 字段筛选符号
EditableRoles res_type.ResFieldByAnys `db:"editableRoles"` // 字段编辑权限 EditableRoles []string `db:"editableRoles"` // 字段编辑权限
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetDataListFields func(listUuid string) []DataListField type GetDataListFields func(listUuid string) []DataListField

View File

@ -1,26 +1,22 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type DataListImportField struct { type DataListImportField struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
DataListUuid string `db:"data_list_uuid"` // 所属列表 UUID DataListUuid string `db:"data_list_uuid"` // 所属列表 UUID
Title res_type.ResFieldByString `db:"title"` // 列表标题 Title string `db:"title"` // 列表标题
Code string `db:"code"` // 字段名称 Code string `db:"code"` // 字段名称
CodeResource string `db:"codeResource"` // 字段所属资源 CodeResource string `db:"codeResource"` // 字段所属资源
FieldDataType string `db:"fieldDataType"` // 字段数据类型 FieldDataType string `db:"fieldDataType"` // 字段数据类型
Width int `db:"width"` // 列宽 Width int `db:"width"` // 列宽
Align string `db:"align"` // 对齐方式 Align string `db:"align"` // 对齐方式
IsWidthFixed bool `db:"isWidthFixed"` // 列宽固定 IsWidthFixed bool `db:"isWidthFixed"` // 列宽固定
ConvertByJs string `db:"convertByJs"` // 前端数据转换控件 ConvertByJs string `db:"convertByJs"` // 前端数据转换控件
ConvertByJsSetting res_type.ResFieldByMap `db:"convertByJsSetting"` // 前端数据转换控件设置参数 ConvertByJsSetting map[string]any `db:"convertByJsSetting"` // 前端数据转换控件设置参数
IsVirtual bool `db:"isVirtual"` // 是否虚拟字段 IsVirtual bool `db:"isVirtual"` // 是否虚拟字段
IsValidator int `db:"isValidator"` // 导入字段验证 IsValidator int `db:"isValidator"` // 导入字段验证
Validators res_type.ResFieldByMap `db:"validators"` // 导入字段验证规则 Validators map[string]any `db:"validators"` // 导入字段验证规则
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetDataListImportFields func(listUuid string) []DataListImportField type GetDataListImportFields func(listUuid string) []DataListImportField

View File

@ -1,38 +1,34 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type DataListOperation struct { type DataListOperation struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
Puuid string `db:"pUuid"` Puuid string `db:"pUuid"`
DataListUuid string `db:"data_list_uuid"` // 所属列表 UUID DataListUuid string `db:"data_list_uuid"` // 所属列表 UUID
Name string `db:"name"` // 按钮名称 Name string `db:"name"` // 按钮名称
Code string `db:"code"` // 按钮标识 Code string `db:"code"` // 按钮标识
Category string `db:"category"` // 按钮类型 Category string `db:"category"` // 按钮类型
Icon string `db:"icon"` // 按钮图标 Icon string `db:"icon"` // 按钮图标
Size string `db:"size"` // 按钮大小 Size string `db:"size"` // 按钮大小
Block bool `db:"block"` // 固定宽度 Block bool `db:"block"` // 固定宽度
Ghost bool `db:"ghost"` // 背景透明 Ghost bool `db:"ghost"` // 背景透明
Shape string `db:"shape"` // 按钮形状 Shape string `db:"shape"` // 按钮形状
Type string `db:"type"` // 按钮样式 Type string `db:"type"` // 按钮样式
IsPopConfirm bool `db:"isPopConfirm"` // 按钮提示 IsPopConfirm bool `db:"isPopConfirm"` // 按钮提示
PopTitle string `db:"popTitle"` // 按钮提示 PopTitle string `db:"popTitle"` // 按钮提示
PopOkText string `db:"popOkText"` // 按钮提示 PopOkText string `db:"popOkText"` // 按钮提示
PopCancelText string `db:"popCancelText"` // 按钮提示 PopCancelText string `db:"popCancelText"` // 按钮提示
PopOkType string `db:"popOkType"` // 按钮提示 PopOkType string `db:"popOkType"` // 按钮提示
PopPlacement string `db:"popPlacement"` // 按钮提示 PopPlacement string `db:"popPlacement"` // 按钮提示
Widget string `db:"widget"` // 按钮组件 Widget string `db:"widget"` // 按钮组件
WidgetType string `db:"widgetType"` // 组件类型 WidgetType string `db:"widgetType"` // 组件类型
WidgetProps res_type.ResFieldByMap `db:"widgetProps"` // 组件PROPS WidgetProps map[string]any `db:"widgetProps"` // 组件PROPS
WidgetSetting res_type.ResFieldByMap `db:"widgetSetting"` // 组件设置 WidgetSetting map[string]any `db:"widgetSetting"` // 组件设置
WidgetContainerSetting res_type.ResFieldByMap `db:"widgetContainerSetting"` // 组件容器设置 WidgetContainerSetting map[string]any `db:"widgetContainerSetting"` // 组件容器设置
IsRefresh int `db:"isRefresh"` // 0不刷新, 1刷新所有数据, 2刷新一条数据 IsRefresh int `db:"isRefresh"` // 0不刷新, 1刷新所有数据, 2刷新一条数据
NoAuthType string `db:"noAuthType"` // 无按钮权限处理方式 NoAuthType string `db:"noAuthType"` // 无按钮权限处理方式
Roles res_type.ResFieldByAnys `db:"roles"` // 按钮权限 Roles []string `db:"roles"` // 按钮权限
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetDataListOperations func(listUuid string) []DataListOperation type GetDataListOperations func(listUuid string) []DataListOperation

View File

@ -1,19 +1,15 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type DataListTab struct { type DataListTab struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
DataListUuid string `db:"data_list_uuid"` // 所属列表 UUID DataListUuid string `db:"data_list_uuid"` // 所属列表 UUID
Label string `db:"label"` // 标签名 Label string `db:"label"` // 标签名
Code string `db:"code"` // 标签标识 Code string `db:"code"` // 标签标识
Order res_type.ResFieldByAnys `db:"order"` // 排序 Order []DataListOrder `db:"order"` // 排序
UseOrderMode int `db:"useOrderMode"` // 排序模式 UseOrderMode int `db:"useOrderMode"` // 排序模式
IsDefault bool `db:"isDefault"` // 是否默认 IsDefault bool `db:"isDefault"` // 是否默认
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetDataListTabs func(listUuid string) []DataListTab type GetDataListTabs func(listUuid string) []DataListTab

View File

@ -1,21 +1,17 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type DataListXlsxField struct { type DataListXlsxField struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
DataListUuid string `db:"data_list_uuid"` // 所属列表 UUID DataListUuid string `db:"data_list_uuid"` // 所属列表 UUID
Title res_type.ResFieldByString `db:"title"` // 列表标题 Title string `db:"title"` // 列表标题
Code string `db:"code"` // 字段名称 Code string `db:"code"` // 字段名称
CodeResource string `db:"codeResource"` // 字段所属资源 CodeResource string `db:"codeResource"` // 字段所属资源
Alias string `db:"alias"` // 字段别名 Alias string `db:"alias"` // 字段别名
FieldDataType string `db:"fieldDataType"` // 字段数据类型 FieldDataType string `db:"fieldDataType"` // 字段数据类型
IsExpr bool `db:"isExpr"` // 字段名是否为SQL表达式 IsExpr bool `db:"isExpr"` // 字段名是否为SQL表达式
IsShow bool `db:"isShow"` // 字段名是否为SQL表达式 IsShow bool `db:"isShow"` // 字段名是否为SQL表达式
ConvertByJs string `db:"convertByJs"` // 字段数据转换组件 ConvertByJs string `db:"convertByJs"` // 字段数据转换组件
ConvertByJsSetting res_type.ResFieldByMap `db:"convertByJsSetting"` // 字段数据转换组件参数 ConvertByJsSetting map[string]any `db:"convertByJsSetting"` // 字段数据转换组件参数
} }
type GetDataListXlsxFields func(listUuid string) []DataListXlsxField type GetDataListXlsxFields func(listUuid string) []DataListXlsxField

View File

@ -1,33 +1,29 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type FsmTransition struct { type FsmTransition struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
FsmUuid string `db:"fsm_uuid"` FsmUuid string `db:"fsm_uuid"`
Name string `db:"name"` Name string `db:"name"`
Code string `db:"code"` Code string `db:"code"`
From string `db:"from"` From string `db:"from"`
To string `db:"to"` To string `db:"to"`
ResourceUuid string `db:"resource_uuid"` ResourceUuid string `db:"resource_uuid"`
FsmName string `db:"fsm_name"` FsmName string `db:"fsm_name"`
PrimaryKey string `db:"primaryKey"` PrimaryKey string `db:"primaryKey"`
StatusField string `db:"statusField"` StatusField string `db:"statusField"`
StatusOptions res_type.ResFieldByAnys `db:"statusOptions"` StatusOptions []map[string]string `db:"statusOptions"`
IsPopConfirm bool `db:"isPopConfirm"` IsPopConfirm bool `db:"isPopConfirm"`
PopTitle string `db:"popTitle"` PopTitle string `db:"popTitle"`
PopOkText string `db:"popOkText"` PopOkText string `db:"popOkText"`
PopCancelText string `db:"popCancelText"` PopCancelText string `db:"popCancelText"`
PopOkType string `db:"popOkType"` PopOkType string `db:"popOkType"`
PopPlacement string `db:"popPlacement"` PopPlacement string `db:"popPlacement"`
WidgetContainerSetting res_type.ResFieldByMap `db:"widgetContainerSetting"` WidgetContainerSetting map[string]any `db:"widgetContainerSetting"`
Roles res_type.ResFieldByAnys `db:"roles"` Roles []string `db:"roles"`
OperationRoles res_type.ResFieldByAnys `db:"operationRoles"` OperationRoles []string `db:"operationRoles"`
IsWithLayoutForm bool `db:"isWithLayoutForm"` IsWithLayoutForm bool `db:"isWithLayoutForm"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetFsmTransition func(uuid string) (FsmTransition, bool) type GetFsmTransition func(uuid string) (FsmTransition, bool)

View File

@ -1,24 +1,20 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type GridLayout struct { type GridLayout struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
ResourceUuid string `db:"resource_uuid"` // 所属资源UUID ResourceUuid string `db:"resource_uuid"` // 所属资源UUID
Code string `db:"code"` // 布局标识 Code string `db:"code"` // 布局标识
Name string `db:"name"` // 布局名称 Name string `db:"name"` // 布局名称
PrimaryKey string `db:"primaryKey"` // 主键 PrimaryKey string `db:"primaryKey"` // 主键
MarginX int `db:"marginX"` // 栅格 x 间距 MarginX int `db:"marginX"` // 栅格 x 间距
MarginY int `db:"marginY"` // 栅格 y 间距 MarginY int `db:"marginY"` // 栅格 y 间距
Cols int `db:"cols"` // 网格列基数 Cols int `db:"cols"` // 网格列基数
RowHeight int `db:"rowHeight"` // 栅格行高 RowHeight int `db:"rowHeight"` // 栅格行高
Css res_type.ResFieldByMap `db:"css"` // 布局CSS Css map[string]any `db:"css"` // 布局CSS
Props res_type.ResFieldByAnys `db:"props"` // 布局PROPS Props []any `db:"props"` // 布局PROPS
Roles res_type.ResFieldByAnys `db:"roles"` Roles []string `db:"roles"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetGridLayout func(code string) (GridLayout, bool) type GetGridLayout func(code string) (GridLayout, bool)

View File

@ -1,32 +1,30 @@
package base package base
import "git.fsdpf.net/go/contracts/res_type"
type GridLayoutField struct { type GridLayoutField struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
GridLayoutUuid string `db:"grid_layout_uuid"` // 所属布局 UUID GridLayoutUuid string `db:"grid_layout_uuid"` // 所属布局 UUID
Type string `db:"type"` Type string `db:"type"`
X int `db:"x"` X int `db:"x"`
Y int `db:"y"` Y int `db:"y"`
W int `db:"w"` W int `db:"w"`
H int `db:"h"` H int `db:"h"`
MinH int `db:"minH"` MinH int `db:"minH"`
MinW int `db:"minW"` MinW int `db:"minW"`
MaxH int `db:"maxH"` MaxH int `db:"maxH"`
MaxW int `db:"maxW"` MaxW int `db:"maxW"`
Code string `db:"code"` Code string `db:"code"`
Label string `db:"label"` Label string `db:"label"`
Widget string `db:"widget"` Widget string `db:"widget"`
WidgetPerfix string `db:"widgetPerfix"` WidgetPerfix string `db:"widgetPerfix"`
WidgetDecorator res_type.ResFieldByString `db:"widgetDecorator"` WidgetDecorator string `db:"widgetDecorator"`
SubWidgets res_type.ResFieldByAnys `db:"subWidgets"` SubWidgets []map[string]any `db:"subWidgets"`
InitialValue string `db:"initialValue"` InitialValue string `db:"initialValue"`
Css res_type.ResFieldByMap `db:"css"` Css map[string]any `db:"css"`
Extras res_type.ResFieldByMap `db:"extras"` Extras map[string]any `db:"extras"`
Hidden bool `db:"hidden"` Hidden bool `db:"hidden"`
IsVirtual bool `db:"isVirtual"` IsVirtual bool `db:"isVirtual"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetGridLayoutFields func(uuid string) []GridLayoutField type GetGridLayoutFields func(uuid string) []GridLayoutField

View File

@ -1,25 +1,23 @@
package base package base
import "git.fsdpf.net/go/contracts/res_type"
type GridLayoutForm struct { type GridLayoutForm struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
ResourceUuid string `db:"resource_uuid"` // 所属资源UUID ResourceUuid string `db:"resource_uuid"` // 所属资源UUID
Code string `db:"code"` // 布局标识 Code string `db:"code"` // 布局标识
Name string `db:"name"` // 布局名称 Name string `db:"name"` // 布局名称
Type int `db:"type"` // 布局类型 Type int `db:"type"` // 布局类型
Align string `db:"align"` // 方向 Align string `db:"align"` // 方向
PrimaryKey string `db:"primaryKey"` // 主键 PrimaryKey string `db:"primaryKey"` // 主键
AutoComplete string `db:"autoComplete"` // 自动填充表单, off | on AutoComplete string `db:"autoComplete"` // 自动填充表单, off | on
RowHeight int `db:"rowHeight"` // 栅格行高 RowHeight int `db:"rowHeight"` // 栅格行高
MarginX int `db:"marginX"` // 栅格 x 间距 MarginX int `db:"marginX"` // 栅格 x 间距
MarginY int `db:"marginY"` // 栅格 y 间距 MarginY int `db:"marginY"` // 栅格 y 间距
FormProps res_type.ResFieldByAnys `db:"formProps"` // 表单PROPS FormProps []map[string]string `db:"formProps"` // 表单PROPS
ListenChangeFields res_type.ResFieldByAnys `db:"listenChangeFields"` // 监听字段 ListenChangeFields []string `db:"listenChangeFields"` // 监听字段
ListenChangeFieldsFunc res_type.ResFieldByString `db:"listenChangeFieldsFunc"` // 监听字段回调方法 ListenChangeFieldsFunc string `db:"listenChangeFieldsFunc"` // 监听字段回调方法
Roles res_type.ResFieldByAnys `db:"roles"` Roles []string `db:"roles"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetGridLayoutForm func(code string) (GridLayoutForm, bool) type GetGridLayoutForm func(code string) (GridLayoutForm, bool)

View File

@ -1,37 +1,33 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type GridLayoutFormField struct { type GridLayoutFormField struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
GridLayoutFormUuid string `db:"grid_layout_form_uuid"` // 所属布局 UUID GridLayoutFormUuid string `db:"grid_layout_form_uuid"` // 所属布局 UUID
Type string `db:"type"` Type string `db:"type"`
X int `db:"x"` X int `db:"x"`
Y int `db:"y"` Y int `db:"y"`
W int `db:"w"` W int `db:"w"`
H int `db:"h"` H int `db:"h"`
MinH int `db:"minH"` MinH int `db:"minH"`
MinW int `db:"minW"` MinW int `db:"minW"`
MaxH int `db:"maxH"` MaxH int `db:"maxH"`
MaxW int `db:"maxW"` MaxW int `db:"maxW"`
Code string `db:"code"` Code string `db:"code"`
Label string `db:"label"` Label string `db:"label"`
Widget string `db:"widget"` Widget string `db:"widget"`
WidgetPerfix string `db:"widgetPerfix"` WidgetPerfix string `db:"widgetPerfix"`
WidgetDecorator res_type.ResFieldByString `db:"widgetDecorator"` WidgetDecorator string `db:"widgetDecorator"`
SubWidgets res_type.ResFieldByAnys `db:"subWidgets"` SubWidgets []any `db:"subWidgets"`
Placeholder string `db:"placeholder"` Placeholder string `db:"placeholder"`
Help string `db:"help"` Help string `db:"help"`
Disabled int `db:"disabled"` Disabled int `db:"disabled"`
InitialValue string `db:"initialValue"` InitialValue string `db:"initialValue"`
Extras res_type.ResFieldByMap `db:"extras"` Extras map[string]any `db:"extras"`
Validators res_type.ResFieldByMap `db:"validators"` Validators map[string]any `db:"validators"`
Hidden bool `db:"hidden"` Hidden bool `db:"hidden"`
IsVirtual bool `db:"isVirtual"` IsVirtual bool `db:"isVirtual"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetGridLayoutFormFields func(uuid string) []GridLayoutFormField type GetGridLayoutFormFields func(uuid string) []GridLayoutFormField

View File

@ -1,27 +1,23 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type Layout struct { type Layout struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
ResourceUuid string `db:"resource_uuid"` // 所属资源UUID ResourceUuid string `db:"resource_uuid"` // 所属资源UUID
Code string `db:"code"` // 布局标识 Code string `db:"code"` // 布局标识
Name string `db:"name"` // 布局名称 Name string `db:"name"` // 布局名称
Type int `db:"type"` // 布局类型 Type int `db:"type"` // 布局类型
Align string `db:"align"` // 方向 Align string `db:"align"` // 方向
PrimaryKey string `db:"primaryKey"` // 主键 PrimaryKey string `db:"primaryKey"` // 主键
AutoComplete string `db:"autoComplete"` // 自动填充表单, off | on AutoComplete string `db:"autoComplete"` // 自动填充表单, off | on
RowHeight int `db:"rowHeight"` // 栅格行高 RowHeight int `db:"rowHeight"` // 栅格行高
MarginX int `db:"marginX"` // 栅格 x 间距 MarginX int `db:"marginX"` // 栅格 x 间距
MarginY int `db:"marginY"` // 栅格 y 间距 MarginY int `db:"marginY"` // 栅格 y 间距
FormProps res_type.ResFieldByAnys `db:"formProps"` // 表单PROPS FormProps []map[string]string `db:"formProps"` // 表单PROPS
ListenChangeFields res_type.ResFieldByAnys `db:"listenChangeFields"` // 监听字段 ListenChangeFields []string `db:"listenChangeFields"` // 监听字段
ListenChangeFieldsFunc res_type.ResFieldByString `db:"listenChangeFieldsFunc"` // 监听字段回调方法 ListenChangeFieldsFunc string `db:"listenChangeFieldsFunc"` // 监听字段回调方法
Roles res_type.ResFieldByAnys `db:"roles"` Roles []string `db:"roles"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetLayout func(code string) (Layout, bool) type GetLayout func(code string) (Layout, bool)

View File

@ -1,37 +1,33 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type LayoutField struct { type LayoutField struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
LayoutUuid string `db:"layout_uuid"` // 所属布局 UUID LayoutUuid string `db:"layout_uuid"` // 所属布局 UUID
Type string `db:"type"` Type string `db:"type"`
X int `db:"x"` X int `db:"x"`
Y int `db:"y"` Y int `db:"y"`
W int `db:"w"` W int `db:"w"`
H int `db:"h"` H int `db:"h"`
MinH int `db:"minH"` MinH int `db:"minH"`
MinW int `db:"minW"` MinW int `db:"minW"`
MaxH int `db:"maxH"` MaxH int `db:"maxH"`
MaxW int `db:"maxW"` MaxW int `db:"maxW"`
Code string `db:"code"` Code string `db:"code"`
Label string `db:"label"` Label string `db:"label"`
Widget string `db:"widget"` Widget string `db:"widget"`
WidgetPerfix string `db:"widgetPerfix"` WidgetPerfix string `db:"widgetPerfix"`
WidgetDecorator res_type.ResFieldByString `db:"widgetDecorator"` WidgetDecorator string `db:"widgetDecorator"`
SubWidgets res_type.ResFieldByAnys `db:"subWidgets"` SubWidgets []map[string]any `db:"subWidgets"`
Placeholder string `db:"placeholder"` Placeholder string `db:"placeholder"`
Help string `db:"help"` Help string `db:"help"`
Disabled int `db:"disabled"` Disabled int `db:"disabled"`
InitialValue string `db:"initialValue"` InitialValue string `db:"initialValue"`
Extras res_type.ResFieldByMap `db:"extras"` Extras map[string]any `db:"extras"`
Validators res_type.ResFieldByMap `db:"validators"` Validators map[string]any `db:"validators"`
Hidden bool `db:"hidden"` Hidden bool `db:"hidden"`
IsVirtual bool `db:"isVirtual"` IsVirtual bool `db:"isVirtual"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetLayoutFields func(uuid string) []LayoutField type GetLayoutFields func(uuid string) []LayoutField

View File

@ -1,25 +1,21 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type Menu struct { type Menu struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
Id int `db:"id"` Id int `db:"id"`
Pid int `db:"pid"` Pid int `db:"pid"`
Type string `db:"type"` Type string `db:"type"`
Name string `db:"name"` Name string `db:"name"`
Icon string `db:"icon"` Icon string `db:"icon"`
Widget string `db:"widget"` Widget string `db:"widget"`
WidgetType string `db:"widgetType"` WidgetType string `db:"widgetType"`
WidgetProps res_type.ResFieldByMap `db:"widgetProps"` WidgetProps map[string]any `db:"widgetProps"`
WidgetSetting res_type.ResFieldByMap `db:"widgetSetting"` WidgetSetting map[string]any `db:"widgetSetting"`
WidgetContainerSetting res_type.ResFieldByMap `db:"widgetContainerSetting"` WidgetContainerSetting map[string]any `db:"widgetContainerSetting"`
Roles res_type.ResFieldByAnys `db:"roles"` Roles []string `db:"roles"`
Platform string `db:"platform"` Platform string `db:"platform"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetMenus func(platform string, roles ...string) []Menu type GetMenus func(platform string, roles ...string) []Menu

View File

@ -1,19 +1,15 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type PrintTemplate struct { type PrintTemplate struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
ResourceUuid string `db:"resource_uuid"` // 所属资源UUID ResourceUuid string `db:"resource_uuid"` // 所属资源UUID
Code string `db:"code"` // 打印模板标识 Code string `db:"code"` // 打印模板标识
Name string `db:"name"` // 打印模板名称 Name string `db:"name"` // 打印模板名称
PrimaryKey string `db:"primaryKey"` // 主键标识 PrimaryKey string `db:"primaryKey"` // 主键标识
Roles res_type.ResFieldByAnys `db:"roles"` // 打印权限 Roles []string `db:"roles"` // 打印权限
Template res_type.ResFieldByMap `db:"template"` // 打印权限 Template map[string]any `db:"template"` // 打印权限
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetPrintTemplate func(uuid string) (PrintTemplate, bool) type GetPrintTemplate func(uuid string) (PrintTemplate, bool)

View File

@ -1,23 +1,19 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type PrintTemplateField struct { type PrintTemplateField struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
PrintTemplateUuid string `db:"print_template_uuid"` // 所属打印模板UUID PrintTemplateUuid string `db:"print_template_uuid"` // 所属打印模板UUID
Label res_type.ResFieldByString `db:"label"` // 字段标签 Label string `db:"label"` // 字段标签
Code string `db:"code"` // 字段名称 Code string `db:"code"` // 字段名称
CodeResource string `db:"codeResource"` // 字段所属资源 CodeResource string `db:"codeResource"` // 字段所属资源
Category string `db:"category"` // 字段控件类型 Category string `db:"category"` // 字段控件类型
Alias string `db:"alias"` // 字段别名 Alias string `db:"alias"` // 字段别名
IsExpr bool `db:"isExpr"` // 字段名是否为SQL表达式 IsExpr bool `db:"isExpr"` // 字段名是否为SQL表达式
FieldDataType string `db:"fieldDataType"` // 字段数据类型 FieldDataType string `db:"fieldDataType"` // 字段数据类型
WidgetByJs string `db:"widgetByJs"` // 前端数据渲染控件 WidgetByJs string `db:"widgetByJs"` // 前端数据渲染控件
WidgetByJsSetting res_type.ResFieldByMap `db:"widgetByJsSetting"` // 前端数据渲染控件设置参数 WidgetByJsSetting map[string]any `db:"widgetByJsSetting"` // 前端数据渲染控件设置参数
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetPrintTemplateFields func(uuid string) []PrintTemplateField type GetPrintTemplateFields func(uuid string) []PrintTemplateField

View File

@ -102,7 +102,7 @@ func (this *QueryField) ToStructField(tags ...string) reflect.StructField {
switch this.typ { switch this.typ {
case contracts.QueryDataType_String: case contracts.QueryDataType_String:
typ = reflect.TypeOf(res_type.ResFieldByString("")) typ = reflect.TypeOf(string(""))
case contracts.QueryDataType_Number: case contracts.QueryDataType_Number:
typ = reflect.TypeOf(res_type.ResFieldByNumber(0)) typ = reflect.TypeOf(res_type.ResFieldByNumber(0))
case contracts.QueryDataType_Integer: case contracts.QueryDataType_Integer:
@ -114,7 +114,7 @@ func (this *QueryField) ToStructField(tags ...string) reflect.StructField {
case contracts.QueryDataType_Array: case contracts.QueryDataType_Array:
typ = reflect.TypeOf(res_type.ResFieldByAnys{}) typ = reflect.TypeOf(res_type.ResFieldByAnys{})
case contracts.QueryDataType_Json: case contracts.QueryDataType_Json:
typ = reflect.TypeOf(res_type.ResFieldByMap{}) typ = reflect.TypeOf(map[string]any{})
} }
return reflect.StructField{ return reflect.StructField{

View File

@ -1,23 +1,27 @@
package base package base
import ( type ResApiParam struct {
"git.fsdpf.net/go/contracts/res_type" Code string `db:"code"`
) Name string `db:"name"`
Category string `db:"category"`
DataType string `db:"type"`
isRequired bool `db:"isRequired"`
}
type ResApi struct { type ResApi struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
Code string `db:"code"` Code string `db:"code"`
UriPrefix string `db:"uri_prefix"` UriPrefix string `db:"uri_prefix"`
Name string `db:"name"` Name string `db:"name"`
PrimaryKey string `db:"primaryKey"` PrimaryKey string `db:"primaryKey"`
ResourceUuid string `db:"resource_uuid"` ResourceUuid string `db:"resource_uuid"`
Method string `db:"method"` Method string `db:"method"`
Category string `db:"action"` Category string `db:"action"`
Params res_type.ResFieldByAnys `db:"params"` Params []ResApiParam `db:"params"`
Roles res_type.ResFieldByAnys `db:"roles"` Roles []string `db:"roles"`
IsAuthDB int `db:"is_auth_db"` // 启用权限过滤 IsAuthDB int `db:"is_auth_db"` // 启用权限过滤
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetResApi func(code string) (ResApi, bool) type GetResApi func(code string) (ResApi, bool)

View File

@ -1,20 +1,27 @@
package base package base
import ( type ResApiApprovalFlow struct {
"git.fsdpf.net/go/contracts/res_type" Uuid string `json:"uuid"`
) Code string `json:"code"`
Name string `json:"name"`
RoleUuid string `json:"role_uuid"`
Type int64 `json:"type"`
Yes string `json:"yes"`
No string `json:"no"`
Comment string `json:"comment"`
}
type ResApiApproval struct { type ResApiApproval struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
ApiUuid string `db:"api_uuid"` ApiUuid string `db:"api_uuid"`
Code string `db:"code"` Code string `db:"code"`
Name string `db:"name"` Name string `db:"name"`
MarkField string `db:"markField"` MarkField string `db:"markField"`
RolesUuid res_type.ResFieldByAnys `db:"rolesUuid"` RolesUuid []string `db:"rolesUuid"`
Flows res_type.ResFieldByAnys `db:"flows"` Flows []ResApiApprovalFlow `db:"flows"`
Roles res_type.ResFieldByAnys `db:"roles"` Roles []string `db:"roles"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetResApiApproval func(code string) (ResApiApproval, bool) type GetResApiApproval func(code string) (ResApiApproval, bool)

View File

@ -40,7 +40,7 @@ func (this ResField) ToStructField(tags ...string) reflect.StructField {
switch this.DataType { switch this.DataType {
case contracts.ResDataType_String, contracts.ResDataType_Text, contracts.ResDataType_Enum, case contracts.ResDataType_String, contracts.ResDataType_Text, contracts.ResDataType_Enum,
contracts.ResDataType_Timestamp, contracts.ResDataType_Date, contracts.ResDataType_Datetime: contracts.ResDataType_Timestamp, contracts.ResDataType_Date, contracts.ResDataType_Datetime:
typ = reflect.TypeOf(res_type.ResFieldByString("")) typ = reflect.TypeOf(string(""))
case contracts.ResDataType_Integer, contracts.ResDataType_SmallInteger: case contracts.ResDataType_Integer, contracts.ResDataType_SmallInteger:
typ = reflect.TypeOf(res_type.ResFieldByInteger(0)) typ = reflect.TypeOf(res_type.ResFieldByInteger(0))
case contracts.ResDataType_Decimal: case contracts.ResDataType_Decimal:
@ -51,7 +51,7 @@ func (this ResField) ToStructField(tags ...string) reflect.StructField {
if this.Default != "" && this.Default[0:1] == "[" { if this.Default != "" && this.Default[0:1] == "[" {
typ = reflect.TypeOf(res_type.ResFieldByAnys{}) typ = reflect.TypeOf(res_type.ResFieldByAnys{})
} else { } else {
typ = reflect.TypeOf(res_type.ResFieldByMap{}) typ = reflect.TypeOf(map[string]any{})
} }
} }
@ -109,7 +109,7 @@ func (this ResField) ToValue(v any) any {
v = float64(data) v = float64(data)
case res_type.ResFieldByNumber: case res_type.ResFieldByNumber:
v = float64(data) v = float64(data)
case res_type.ResFieldByString: case string:
v = strings.Trim(string(data), " ") v = strings.Trim(string(data), " ")
case res_type.ResFieldByAnys: case res_type.ResFieldByAnys:
if v != nil { if v != nil {
@ -117,12 +117,6 @@ func (this ResField) ToValue(v any) any {
return string(b) return string(b)
} }
v = []any(data) v = []any(data)
case res_type.ResFieldByMap:
if v != nil {
b, _ := json.Marshal(v)
return string(b)
}
v = map[string]any(data)
case []any, []string, []int, []float64, []float32, []int64: case []any, []string, []int, []float64, []float32, []int64:
if v != nil { if v != nil {
b, _ := json.Marshal(v) b, _ := json.Marshal(v)

View File

@ -1,19 +1,15 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type ResWidgetOperation struct { type ResWidgetOperation struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
WidgetUuid string `db:"widget_uuid"` WidgetUuid string `db:"widget_uuid"`
Name string `db:"name"` Name string `db:"name"`
NoAuthType string `db:"noAuthType"` NoAuthType string `db:"noAuthType"`
PropsAuthRule res_type.ResFieldByAnys `db:"propsAuthRule"` PropsAuthRule []any `db:"propsAuthRule"`
ExtraAuthRule res_type.ResFieldByAnys `db:"extraAuthRule"` ExtraAuthRule []any `db:"extraAuthRule"`
Roles res_type.ResFieldByAnys `db:"roles"` Roles []string `db:"roles"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
type GetResWidgetOperations func(roles ...string) []ResWidgetOperation type GetResWidgetOperations func(roles ...string) []ResWidgetOperation

View File

@ -12,7 +12,6 @@ import (
"git.fsdpf.net/go/contracts" "git.fsdpf.net/go/contracts"
"git.fsdpf.net/go/contracts/helper" "git.fsdpf.net/go/contracts/helper"
"git.fsdpf.net/go/contracts/res_type"
"git.fsdpf.net/go/contracts/support" "git.fsdpf.net/go/contracts/support"
"git.fsdpf.net/go/db" "git.fsdpf.net/go/db"
) )
@ -42,21 +41,21 @@ type ResChangeRecordTopicPayload struct {
type Resource struct { type Resource struct {
container *do.Injector container *do.Injector
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
PUuid string `db:"pUuid"` PUuid string `db:"pUuid"`
Code string `db:"code"` Code string `db:"code"`
Name string `db:"name"` Name string `db:"name"`
IsResVirtual bool `db:"isVirtual"` IsResVirtual bool `db:"isVirtual"`
Table string `db:"table"` Table string `db:"table"`
Namespace string `db:"namespace"` Namespace string `db:"namespace"`
Workspace string `db:"workspace"` Workspace string `db:"workspace"`
Primarykey string `db:"primaryKey"` Primarykey string `db:"primaryKey"`
IsHistoryRecord bool `db:"isHistoryRecord"` IsHistoryRecord bool `db:"isHistoryRecord"`
HistoryCacheMax int `db:"historyCacheMax"` HistoryCacheMax int `db:"historyCacheMax"`
Fields ResFields `db:"fields"` Fields ResFields `db:"fields"`
Roles res_type.ResFieldByMap `db:"roles"` Roles map[string]any `db:"roles"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
func (this *Resource) InitContainer(container *do.Injector) { func (this *Resource) InitContainer(container *do.Injector) {

View File

@ -1,25 +1,21 @@
package base package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type Route struct { type Route struct {
Uuid string `db:"uuid"` Uuid string `db:"uuid"`
Name string `db:"name"` Name string `db:"name"`
Uri string `db:"uri"` Uri string `db:"uri"`
Layout string `db:"layout"` Layout string `db:"layout"`
IsLogin bool `db:"isLogin"` IsLogin bool `db:"isLogin"`
IsPhone bool `db:"isPhone"` IsPhone bool `db:"isPhone"`
Type string `db:"type"` Type string `db:"type"`
Component string `db:"component"` Component string `db:"component"`
WidgetProps res_type.ResFieldByMap `db:"widgetProps"` WidgetProps map[string]any `db:"widgetProps"`
WidgetSetting res_type.ResFieldByMap `db:"widgetSetting"` WidgetSetting map[string]any `db:"widgetSetting"`
WidgetContainerSetting res_type.ResFieldByMap `db:"widgetContainerSetting"` WidgetContainerSetting map[string]any `db:"widgetContainerSetting"`
Exact bool `db:"exact"` Exact bool `db:"exact"`
Platform string `db:"platform"` Platform string `db:"platform"`
UpdatedAt string `db:"updated_at"` UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"` CreatedAt string `db:"created_at"`
} }
// 前端路由 // 前端路由

2
go.mod
View File

@ -3,7 +3,7 @@ module git.fsdpf.net/go/contracts
go 1.18 go 1.18
require ( require (
git.fsdpf.net/go/db v0.0.0-20230412075825-59b3faa171bc git.fsdpf.net/go/db v0.0.0-20230621051209-5740d112407f
github.com/go-chi/chi v1.5.4 github.com/go-chi/chi v1.5.4
github.com/golang/protobuf v1.5.2 github.com/golang/protobuf v1.5.2
github.com/google/uuid v1.3.0 github.com/google/uuid v1.3.0

6
go.sum
View File

@ -38,6 +38,12 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
git.fsdpf.net/go/db v0.0.0-20230412075825-59b3faa171bc h1:d3ZqjNGbsgVknkbvATV96rv1bW8mwqbmnV5bfGTVRVU= git.fsdpf.net/go/db v0.0.0-20230412075825-59b3faa171bc h1:d3ZqjNGbsgVknkbvATV96rv1bW8mwqbmnV5bfGTVRVU=
git.fsdpf.net/go/db v0.0.0-20230412075825-59b3faa171bc/go.mod h1:397Sdx1cJS0OlHtTX1bVl//9k3Xn0Klnc6jC4MAkb6w= git.fsdpf.net/go/db v0.0.0-20230412075825-59b3faa171bc/go.mod h1:397Sdx1cJS0OlHtTX1bVl//9k3Xn0Klnc6jC4MAkb6w=
git.fsdpf.net/go/db v0.0.0-20230621020351-bf3032103e5f h1:h8Id5NLdX4zaAVd+Qe1iO5M3O4LTtTkHQCHBKAjt1Tc=
git.fsdpf.net/go/db v0.0.0-20230621020351-bf3032103e5f/go.mod h1:397Sdx1cJS0OlHtTX1bVl//9k3Xn0Klnc6jC4MAkb6w=
git.fsdpf.net/go/db v0.0.0-20230621030725-28d9dcbd4dcb h1:3igohcxzv3K+uir9IGBK1AGV8OC7FvfW6fyFD98QqcM=
git.fsdpf.net/go/db v0.0.0-20230621030725-28d9dcbd4dcb/go.mod h1:397Sdx1cJS0OlHtTX1bVl//9k3Xn0Klnc6jC4MAkb6w=
git.fsdpf.net/go/db v0.0.0-20230621051209-5740d112407f h1:H+/H6j+hyFMgSy+tUNmymRy7/PWQRjjp8qY/DrhwrsY=
git.fsdpf.net/go/db v0.0.0-20230621051209-5740d112407f/go.mod h1:397Sdx1cJS0OlHtTX1bVl//9k3Xn0Klnc6jC4MAkb6w=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA=