diff --git a/base/grid_layout_form_field.go b/base/grid_layout_form_field.go index 73639a4..b16817c 100644 --- a/base/grid_layout_form_field.go +++ b/base/grid_layout_form_field.go @@ -1,33 +1,33 @@ package base type GridLayoutFormField struct { - Uuid string `db:"uuid"` - GridLayoutFormUuid string `db:"grid_layout_form_uuid"` // 所属布局 UUID - Type string `db:"type"` - X int `db:"x"` - Y int `db:"y"` - W int `db:"w"` - H int `db:"h"` - MinH int `db:"minH"` - MinW int `db:"minW"` - MaxH int `db:"maxH"` - MaxW int `db:"maxW"` - Code string `db:"code"` - Label string `db:"label"` - Widget string `db:"widget"` - WidgetPerfix string `db:"widgetPerfix"` - WidgetDecorator string `db:"widgetDecorator"` - SubWidgets []any `db:"subWidgets"` - Placeholder string `db:"placeholder"` - Help string `db:"help"` - Disabled int `db:"disabled"` - InitialValue string `db:"initialValue"` - Extras map[string]any `db:"extras"` - Validators map[string]any `db:"validators"` - Hidden bool `db:"hidden"` - IsVirtual bool `db:"isVirtual"` - UpdatedAt string `db:"updated_at"` - CreatedAt string `db:"created_at"` + Uuid string `db:"uuid"` + GridLayoutFormUuid string `db:"grid_layout_form_uuid"` // 所属布局 UUID + Type string `db:"type"` + X int `db:"x"` + Y int `db:"y"` + W int `db:"w"` + H int `db:"h"` + MinH int `db:"minH"` + MinW int `db:"minW"` + MaxH int `db:"maxH"` + MaxW int `db:"maxW"` + Code string `db:"code"` + Label string `db:"label"` + Widget string `db:"widget"` + WidgetPerfix string `db:"widgetPerfix"` + WidgetDecorator string `db:"widgetDecorator"` + SubWidgets []map[string]any `db:"subWidgets"` + Placeholder string `db:"placeholder"` + Help string `db:"help"` + Disabled int `db:"disabled"` + InitialValue string `db:"initialValue"` + Extras map[string]any `db:"extras"` + Validators map[string]any `db:"validators"` + Hidden bool `db:"hidden"` + IsVirtual bool `db:"isVirtual"` + UpdatedAt string `db:"updated_at"` + CreatedAt string `db:"created_at"` } type GetGridLayoutFormFields func(uuid string) []GridLayoutFormField diff --git a/base/layout.go b/base/layout.go deleted file mode 100644 index 1043f5c..0000000 --- a/base/layout.go +++ /dev/null @@ -1,23 +0,0 @@ -package base - -type Layout struct { - Uuid string `db:"uuid"` - ResourceUuid string `db:"resource_uuid"` // 所属资源UUID - Code string `db:"code"` // 布局标识 - Name string `db:"name"` // 布局名称 - Type int `db:"type"` // 布局类型 - Align string `db:"align"` // 方向 - PrimaryKey string `db:"primaryKey"` // 主键 - AutoComplete string `db:"autoComplete"` // 自动填充表单, off | on - RowHeight int `db:"rowHeight"` // 栅格行高 - MarginX int `db:"marginX"` // 栅格 x 间距 - MarginY int `db:"marginY"` // 栅格 y 间距 - FormProps []map[string]string `db:"formProps"` // 表单PROPS - ListenChangeFields []string `db:"listenChangeFields"` // 监听字段 - ListenChangeFieldsFunc string `db:"listenChangeFieldsFunc"` // 监听字段回调方法 - Roles []string `db:"roles"` - UpdatedAt string `db:"updated_at"` - CreatedAt string `db:"created_at"` -} - -type GetLayout func(code string) (Layout, bool) diff --git a/base/layout_field.go b/base/layout_field.go deleted file mode 100644 index 11213a2..0000000 --- a/base/layout_field.go +++ /dev/null @@ -1,33 +0,0 @@ -package base - -type LayoutField struct { - Uuid string `db:"uuid"` - LayoutUuid string `db:"layout_uuid"` // 所属布局 UUID - Type string `db:"type"` - X int `db:"x"` - Y int `db:"y"` - W int `db:"w"` - H int `db:"h"` - MinH int `db:"minH"` - MinW int `db:"minW"` - MaxH int `db:"maxH"` - MaxW int `db:"maxW"` - Code string `db:"code"` - Label string `db:"label"` - Widget string `db:"widget"` - WidgetPerfix string `db:"widgetPerfix"` - WidgetDecorator string `db:"widgetDecorator"` - SubWidgets []map[string]any `db:"subWidgets"` - Placeholder string `db:"placeholder"` - Help string `db:"help"` - Disabled int `db:"disabled"` - InitialValue string `db:"initialValue"` - Extras map[string]any `db:"extras"` - Validators map[string]any `db:"validators"` - Hidden bool `db:"hidden"` - IsVirtual bool `db:"isVirtual"` - UpdatedAt string `db:"updated_at"` - CreatedAt string `db:"created_at"` -} - -type GetLayoutFields func(uuid string) []LayoutField