package base

import (
	"git.fsdpf.net/go/contracts/res_type"
)

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

type GetDataListOperations func(listUuid string) []DataListOperation