contracts/base/grid_layout.go

21 lines
938 B
Go
Raw Normal View History

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