BaseStyle

package
v5.1.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ComponentSort 组件库分类
	ComponentSort = ClassSort.Sort{
		SortTableName: "core_style_component_sort",
	}
	//StyleSort 页面样式库分类
	StyleSort = ClassSort.Sort{
		SortTableName: "core_style_sort",
	}
	//ComponentTag 组件库标签
	ComponentTag = ClassTag.Tag{
		TagTableName: "core_style_component_tag",
	}
	//StyleTag 页面样式库标签
	StyleTag = ClassTag.Tag{
		TagTableName: "core_style_tag",
	}
)

* 样式库设计 本模块用于页面展示时,对布局、风格进行的调整设计。 外部任意模块可引用该内容,作为页面表现形式。

Functions

func DeleteComponent

func DeleteComponent(args *ArgsDeleteComponent) (err error)

func DeleteOrgStyle

func DeleteOrgStyle(args *ArgsDeleteOrgStyle) (err error)

DeleteOrgStyle 删除样式关联

func DeleteStyle

func DeleteStyle(args *ArgsDeleteStyle) (err error)

DeleteStyle 删除样式库

func GetComponentMoreMap

func GetComponentMoreMap(args *ArgsGetComponentMore) (data map[int64]string, err error)

func GetStyleMoreMap

func GetStyleMoreMap(args *ArgsGetStyleMore) (data map[int64]string, err error)

func Import

func Import(args *ArgsImport) (err error)

Import 导入数据

func Output

func Output(args *ArgsOutput) (data string, err error)

Output 导出样式库

func UpdateComponent

func UpdateComponent(args *ArgsUpdateComponent) (err error)

func UpdateStyle

func UpdateStyle(args *ArgsUpdateStyle) (err error)

Types

type ArgsCreateComponent

type ArgsCreateComponent struct {
	//关联标识码
	// 必填
	// 页面内独特的代码片段,声明后可直接定义该组件的默认参数形式
	Mark string `db:"mark" json:"mark" check:"mark"`
	//组件名称
	Name string `db:"name" json:"name" check:"name"`
	//组件介绍
	Des string `db:"des" json:"des" check:"des" min:"1" max:"3000" empty:"true"`
	//组件封面
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id" empty:"true"`
	//组件描述文件组
	DesFiles pq.Int64Array `db:"des_files" json:"desFiles" check:"ids" empty:"true"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"`
	//标签组
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

创建新的组件

type ArgsCreateStyle

type ArgsCreateStyle struct {
	//样式库名称
	Name string `db:"name" json:"name" check:"name"`
	//关联标识码
	// 用于识别代码片段
	Mark string `db:"mark" json:"mark" check:"mark"`
	//样式使用渠道
	// app APP;wxx 小程序等,可以任意定义,模块内不做限制
	SystemMark string `db:"system_mark" json:"systemMark" check:"mark"`
	//分栏样式结构设计
	Components pq.Int64Array `db:"components" json:"components" check:"ids" empty:"true"`
	//默认标题
	// 标题是展示给用户的,样式库名称和该标题不是一个
	Title string `db:"title" json:"title" check:"name" empty:"true"`
	//默认描述
	Des string `db:"des" json:"des" check:"des" min:"1" max:"3000" empty:"true"`
	//默认封面
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id" empty:"true"`
	//默认描述文件组
	DesFiles pq.Int64Array `db:"des_files" json:"desFiles" check:"ids" empty:"true"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"`
	//标签组
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

创建新的样式库

type ArgsDeleteComponent

type ArgsDeleteComponent struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
}

删除组件

type ArgsDeleteOrgStyle

type ArgsDeleteOrgStyle struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	// 可选,验证
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
}

ArgsDeleteOrgStyle 删除样式关联参数

type ArgsDeleteStyle

type ArgsDeleteStyle struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
}

ArgsDeleteStyle 删除样式库参数

type ArgsGetComponentByID

type ArgsGetComponentByID struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
}

ArgsGetComponentByID 获取指定组件参数

type ArgsGetComponentByMark

type ArgsGetComponentByMark struct {
	//组件mark
	Mark string `db:"mark" json:"mark" check:"mark"`
}

type ArgsGetComponentList

type ArgsGetComponentList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//关联标识码
	// 必填
	// 页面内独特的代码片段,声明后可直接定义该组件的默认参数形式
	Mark string `db:"mark" json:"mark" check:"mark" empty:"true"`
	//分类ID
	Sort int64 `db:"sort" json:"sort" check:"id" empty:"true"`
	//标签组
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//是否删除
	IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

ArgsGetComponentList 获取组件列表参数

type ArgsGetComponentMore

type ArgsGetComponentMore struct {
	//ID列
	IDs pq.Int64Array `json:"ids" check:"ids"`
	//是否包含删除数据
	HaveRemove bool `json:"haveRemove" check:"bool"`
}

ArgsGetComponentMore 获取一组IDs参数

type ArgsGetOrgByID

type ArgsGetOrgByID struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//组织ID
	// 可选,验证
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
}

获取ID

type ArgsGetOrgByStyleID

type ArgsGetOrgByStyleID struct {
	//样式表ID
	StyleID int64 `db:"style_id" json:"styleID" check:"id"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
}

type ArgsGetOrgByStyleMark

type ArgsGetOrgByStyleMark struct {
	//样式mark
	Mark string `db:"mark" json:"mark" check:"mark"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
}

ArgsGetOrgByStyleMark 获取指定页面Mark的样式数据参数

type ArgsGetOrgList

type ArgsGetOrgList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//样式ID
	StyleID int64 `db:"style_id" json:"styleID" check:"id" empty:"true"`
	//是否删除
	IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

获取组织的样式库

type ArgsGetStyleByID

type ArgsGetStyleByID struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
}

获取样式库

type ArgsGetStyleByMark

type ArgsGetStyleByMark struct {
	//样式mark
	Mark string `db:"mark" json:"mark" check:"mark"`
}

通过mark获取样式哭

type ArgsGetStyleList

type ArgsGetStyleList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//关联标识码
	// 必填
	// 页面内独特的代码片段,声明后可直接定义该组件的默认参数形式
	Mark string `db:"mark" json:"mark" check:"mark" empty:"true"`
	//分类ID
	Sort int64 `db:"sort" json:"sort" check:"id" empty:"true"`
	//标签组
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//是否删除
	IsRemove bool `db:"is_remove" json:"isRemove" check:"bool"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

获取样式库列表

type ArgsGetStyleMore

type ArgsGetStyleMore struct {
	//ID列
	IDs pq.Int64Array `json:"ids" check:"ids"`
	//是否包含删除数据
	HaveRemove bool `json:"haveRemove" check:"bool"`
}

获取一组IDs

type ArgsImport

type ArgsImport struct {
	//数据
	Data string `json:"data"`
	//是否覆盖
	// 如果发现相同数据,是否覆盖
	NeedCover bool `json:"needCover"`
}

ArgsImport 导入数据参数

type ArgsOutput

type ArgsOutput struct {
	//仅选择样式库的mark列
	PickMarks pq.StringArray `json:"pickMarks"`
	//排除样式
	// 相关样式不会导出
	ExcludeMarks []string `json:"excludeMarks"`
}

ArgsOutput 导出样式库参数

type ArgsSetOrgStyle

type ArgsSetOrgStyle struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id"`
	//样式表ID
	StyleID int64 `db:"style_id" json:"styleID" check:"id"`
	//组件列
	Components FieldsOrgComponents `db:"components" json:"components"`
	//标题
	Title string `db:"title" json:"title" check:"name"`
	//描述
	Des string `db:"des" json:"des" check:"des" min:"1" max:"3000" empty:"true"`
	//封面
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id" empty:"true"`
	//描述文件组
	DesFiles pq.Int64Array `db:"des_files" json:"desFiles" check:"ids" empty:"true"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

ArgsSetOrgStyle 创建新的样式关联参数

type ArgsUpdateComponent

type ArgsUpdateComponent struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//关联标识码
	// 必填
	// 页面内独特的代码片段,声明后可直接定义该组件的默认参数形式
	Mark string `db:"mark" json:"mark" check:"mark"`
	//组件名称
	Name string `db:"name" json:"name" check:"name"`
	//组件介绍
	Des string `db:"des" json:"des" check:"des" min:"1" max:"3000" empty:"true"`
	//组件封面
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id" empty:"true"`
	//组件描述文件组
	DesFiles pq.Int64Array `db:"des_files" json:"desFiles" check:"ids" empty:"true"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"`
	//标签组
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

修改组件

type ArgsUpdateStyle

type ArgsUpdateStyle struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//样式库名称
	Name string `db:"name" json:"name" check:"name"`
	//关联标识码
	// 用于识别代码片段
	Mark string `db:"mark" json:"mark" check:"mark"`
	//样式使用渠道
	// app APP;wxx 小程序等,可以任意定义,模块内不做限制
	SystemMark string `db:"system_mark" json:"systemMark" check:"mark"`
	//分栏样式结构设计
	Components pq.Int64Array `db:"components" json:"components" check:"ids" empty:"true"`
	//默认标题
	// 标题是展示给用户的,样式库名称和该标题不是一个
	Title string `db:"title" json:"title" check:"name" empty:"true"`
	//默认描述
	Des string `db:"des" json:"des" check:"des" min:"1" max:"3000" empty:"true"`
	//默认封面
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id" empty:"true"`
	//默认描述文件组
	DesFiles pq.Int64Array `db:"des_files" json:"desFiles" check:"ids" empty:"true"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"`
	//标签组
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

修改样式库

type DataGetOrgByStyleMark

type DataGetOrgByStyleMark struct {
	//样式基础
	Name string `json:"name"`
	//关联标识码
	// 用于识别代码片段
	Mark string `db:"mark" json:"mark"`
	//样式使用渠道
	// app APP;wxx 小程序等,可以任意定义,模块内不做限制
	SystemMark string `db:"system_mark" json:"systemMark"`
	//默认标题
	// 标题是展示给用户的,样式库名称和该标题不是一个
	Title string `db:"title" json:"title"`
	//默认描述
	Des string `db:"des" json:"des"`
	//默认封面
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID"`
	//默认描述文件组
	DesFiles pq.Int64Array `db:"des_files" json:"desFiles"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
	//组件列
	Components []DataGetOrgByStyleMarkComponents `json:"components"`
}

func GetOrgByStyleID

func GetOrgByStyleID(args *ArgsGetOrgByStyleID) (data DataGetOrgByStyleMark, err error)

func GetOrgByStyleMark

func GetOrgByStyleMark(args *ArgsGetOrgByStyleMark) (data DataGetOrgByStyleMark, err error)

GetOrgByStyleMark 获取指定页面Mark的样式数据 如果组织没有自定义,则按照默认构建数据并反馈

type DataGetOrgByStyleMarkComponents

type DataGetOrgByStyleMarkComponents struct {
	//组件ID
	ComponentID int64 `json:"componentID"`
	//关联标识码
	// 必填
	// 页面内独特的代码片段,声明后可直接定义该组件的默认参数形式
	Mark string `db:"mark" json:"mark"`
	//组件名称
	Name string `db:"name" json:"name"`
	//组件介绍
	Des string `db:"des" json:"des"`
	//组件封面
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID"`
	//组件描述文件组
	DesFiles pq.Int64Array `db:"des_files" json:"desFiles"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

type DataOutput

type DataOutput struct {
	//样式库名称
	Name string `db:"name" json:"name"`
	//关联标识码
	// 用于识别代码片段
	Mark string `db:"mark" json:"mark"`
	//样式使用渠道
	// app APP;wxx 小程序等,可以任意定义,模块内不做限制
	SystemMark string `db:"system_mark" json:"systemMark"`
	//分栏样式结构设计
	Components []DataOutputComponent `db:"components" json:"components"`
	//默认标题
	// 标题是展示给用户的,样式库名称和该标题不是一个
	Title string `db:"title" json:"title"`
	//默认描述
	Des string `db:"des" json:"des"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID"`
	//标签组
	Tags pq.Int64Array `db:"tags" json:"tags"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

type DataOutputComponent

type DataOutputComponent struct {
	//关联标识码
	// 必填
	// 页面内独特的代码片段,声明后可直接定义该组件的默认参数形式
	Mark string `db:"mark" json:"mark"`
	//组件名称
	Name string `db:"name" json:"name"`
	//组件介绍
	Des string `db:"des" json:"des"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID"`
	//标签组
	Tags pq.Int64Array `db:"tags" json:"tags"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

DataOutputComponent 导出样式库数据

type FieldsComponent

type FieldsComponent struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt"`
	//关联标识码
	// 必填
	// 页面内独特的代码片段,声明后可直接定义该组件的默认参数形式
	Mark string `db:"mark" json:"mark"`
	//组件名称
	Name string `db:"name" json:"name"`
	//组件介绍
	Des string `db:"des" json:"des"`
	//组件封面
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID"`
	//组件描述文件组
	DesFiles pq.Int64Array `db:"des_files" json:"desFiles"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID"`
	//标签组
	Tags pq.Int64Array `db:"tags" json:"tags"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

FieldsComponent 组件 按照顺序被样式主表定义引用 样式需要被申明

func CreateComponent

func CreateComponent(args *ArgsCreateComponent) (data FieldsComponent, err error)

func GetComponentByID

func GetComponentByID(args *ArgsGetComponentByID) (data FieldsComponent, err error)

GetComponentByID 获取指定组件

func GetComponentByMark

func GetComponentByMark(args *ArgsGetComponentByMark) (data FieldsComponent, err error)

func GetComponentList

func GetComponentList(args *ArgsGetComponentList) (dataList []FieldsComponent, dataCount int64, err error)

GetComponentList 获取组件列表

func GetComponentMore

func GetComponentMore(args *ArgsGetComponentMore) (dataList []FieldsComponent, err error)

GetComponentMore 获取一组IDs

type FieldsOrg

type FieldsOrg struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt"`
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID"`
	//样式表ID
	StyleID int64 `db:"style_id" json:"styleID"`
	//组件列
	Components FieldsOrgComponents `db:"components" json:"components"`
	//标题
	Title string `db:"title" json:"title"`
	//描述
	Des string `db:"des" json:"des"`
	//封面
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID"`
	//描述文件组
	DesFiles pq.Int64Array `db:"des_files" json:"desFiles"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

FieldsOrg 组织定义表

func GetOrgByID

func GetOrgByID(args *ArgsGetOrgByID) (data FieldsOrg, err error)

func GetOrgList

func GetOrgList(args *ArgsGetOrgList) (dataList []FieldsOrg, dataCount int64, err error)

func SetOrgStyle

func SetOrgStyle(args *ArgsSetOrgStyle) (data FieldsOrg, err error)

SetOrgStyle 创建新的样式关联

type FieldsOrgComponent

type FieldsOrgComponent struct {
	//组件ID
	ComponentID int64 `db:"component_id" json:"componentID" check:"id"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

func (*FieldsOrgComponent) Scan

func (t *FieldsOrgComponent) Scan(value interface{}) error

func (FieldsOrgComponent) Value

func (t FieldsOrgComponent) Value() (driver.Value, error)

Value sql底层处理器

type FieldsOrgComponents

type FieldsOrgComponents []FieldsOrgComponent

func (*FieldsOrgComponents) Scan

func (t *FieldsOrgComponents) Scan(value interface{}) error

func (FieldsOrgComponents) Value

func (t FieldsOrgComponents) Value() (driver.Value, error)

Value sql底层处理器

type FieldsStyle

type FieldsStyle struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt"`
	//样式库名称
	Name string `db:"name" json:"name"`
	//关联标识码
	// 用于识别代码片段
	Mark string `db:"mark" json:"mark"`
	//样式使用渠道
	// app APP;wxx 小程序等,可以任意定义,模块内不做限制
	SystemMark string `db:"system_mark" json:"systemMark"`
	//分栏样式结构设计
	Components pq.Int64Array `db:"components" json:"components"`
	//默认标题
	// 标题是展示给用户的,样式库名称和该标题不是一个
	Title string `db:"title" json:"title"`
	//默认描述
	Des string `db:"des" json:"des"`
	//默认封面
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID"`
	//默认描述文件组
	DesFiles pq.Int64Array `db:"des_files" json:"desFiles"`
	//分类ID
	SortID int64 `db:"sort_id" json:"sortID"`
	//标签组
	Tags pq.Int64Array `db:"tags" json:"tags"`
	//附加参数
	// 布局相关的自定会参数,都将在此处定义
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

FieldsStyle 样式主表

func CreateStyle

func CreateStyle(args *ArgsCreateStyle) (data FieldsStyle, err error)

func GetStyleByID

func GetStyleByID(args *ArgsGetStyleByID) (data FieldsStyle, err error)

func GetStyleByMark

func GetStyleByMark(args *ArgsGetStyleByMark) (data FieldsStyle, err error)

func GetStyleList

func GetStyleList(args *ArgsGetStyleList) (dataList []FieldsStyle, dataCount int64, err error)

func GetStyleMore

func GetStyleMore(args *ArgsGetStyleMore) (dataList []FieldsStyle, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL