ToolsHelpContent

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//Sort 分类系统
	Sort = ClassSort.Sort{
		SortTableName: "tools_help_content_sort",
	}
	//Tag 标签系统
	Tag = ClassTag.Tag{
		TagTableName: "tools_help_content_tag",
	}
)

Functions

func DeleteContent

func DeleteContent(args *ArgsDeleteContent) (err error)

func GetContentMoreByMarkMap

func GetContentMoreByMarkMap(args *ArgsGetContentMoreByMark) (data map[string]string, err error)

func GetContentMoreMap

func GetContentMoreMap(args *ArgsGetContentMore) (data map[int64]string, err error)

func UpdateContent

func UpdateContent(args *ArgsUpdateContent) (err error)

Types

type ArgsCreateContent

type ArgsCreateContent struct {
	//文本唯一标识码
	// none为预留值,指定后可以重复且该值将无效
	// 用于在不同页面使用
	// 删除后,将不会占用该mark设置,一个mark可以指定一个正常数据和多个已删除数据
	Mark string `db:"mark" json:"mark" check:"mark" empty:"true"`
	//是否公开
	// 非公开数据将作为草稿或私有数据存在,只有管理员可以看到
	IsPublic bool `db:"is_public" json:"isPublic" check:"bool" empty:"true"`
	//分类
	SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"`
	//标签
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//标题
	Title string `db:"title" json:"title" check:"name"`
	//封面文件
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id" empty:"true"`
	//内容
	Des string `db:"des" json:"des" check:"des" min:"1" max:"6000" empty:"true"`
	//关联阅读引导ID
	BindIDs pq.Int64Array `db:"bind_ids" json:"bindIDs" check:"ids" empty:"true"`
	//关联阅读引导mark
	BindMarks pq.StringArray `db:"bind_marks" json:"bindMarks" check:"marks" empty:"true"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

创建新的词条

type ArgsDeleteContent

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

删除词条

type ArgsGetContentByID

type ArgsGetContentByID struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//是否需要public
	NeedPublic bool `db:"need_public" json:"needPublic" check:"bool"`
	//是否公开
	IsPublic bool `db:"is_public" json:"isPublic" check:"bool"`
}

ArgsGetContentByID 获取ID参数

type ArgsGetContentByMark

type ArgsGetContentByMark struct {
	//文本唯一标识码
	// none为预留值,指定后可以重复且该值将无效
	// 用于在不同页面使用
	// 删除后,将不会占用该mark设置,一个mark可以指定一个正常数据和多个已删除数据
	Mark string `db:"mark" json:"mark"`
	//是否需要public
	NeedPublic bool `db:"need_public" json:"needPublic" check:"bool"`
	//是否公开
	IsPublic bool `db:"is_public" json:"isPublic" check:"bool"`
}

获取指定mark

type ArgsGetContentList

type ArgsGetContentList struct {
	//分页
	Pages CoreSQLPages.ArgsDataList `json:"pages"`
	//文本唯一标识码
	// none为预留值,指定后可以重复且该值将无效
	// 用于在不同页面使用
	// 删除后,将不会占用该mark设置,一个mark可以指定一个正常数据和多个已删除数据
	Mark string `db:"mark" json:"mark"`
	//分类ID
	// > -1 为包含;否则不包含。0为没有设定
	SortID int64 `db:"sort_id" json:"sortID" 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 ArgsGetContentMore

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

获取一组IDs

type ArgsGetContentMoreByMark

type ArgsGetContentMoreByMark struct {
	//Mark列
	Marks pq.StringArray `json:"marks" check:"marks"`
	//是否包含删除数据
	HaveRemove bool `json:"haveRemove" check:"bool"`
}

获取一组Marks

type ArgsUpdateContent

type ArgsUpdateContent struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id" check:"id"`
	//文本唯一标识码
	// none为预留值,指定后可以重复且该值将无效
	// 用于在不同页面使用
	// 删除后,将不会占用该mark设置,一个mark可以指定一个正常数据和多个已删除数据
	Mark string `db:"mark" json:"mark" check:"mark" empty:"true"`
	//是否公开
	// 非公开数据将作为草稿或私有数据存在,只有管理员可以看到
	IsPublic bool `db:"is_public" json:"isPublic" check:"bool" empty:"true"`
	//分类
	SortID int64 `db:"sort_id" json:"sortID" check:"id" empty:"true"`
	//标签
	Tags pq.Int64Array `db:"tags" json:"tags" check:"ids" empty:"true"`
	//标题
	Title string `db:"title" json:"title" check:"name"`
	//封面文件
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID" check:"id" empty:"true"`
	//内容
	Des string `db:"des" json:"des" check:"des" min:"1" max:"6000" empty:"true"`
	//关联阅读引导ID
	BindIDs pq.Int64Array `db:"bind_ids" json:"bindIDs" check:"ids" empty:"true"`
	//关联阅读引导mark
	BindMarks pq.StringArray `db:"bind_marks" json:"bindMarks" check:"marks" empty:"true"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

修改词条

type FieldsContent

type FieldsContent 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"`
	//文本唯一标识码
	// none为预留值,指定后可以重复且该值将无效
	// 用于在不同页面使用
	// 删除后,将不会占用该mark设置,一个mark可以指定一个正常数据和多个已删除数据
	Mark string `db:"mark" json:"mark"`
	//是否公开
	// 非公开数据将作为草稿或私有数据存在,只有管理员可以看到
	IsPublic bool `db:"is_public" json:"isPublic"`
	//分类
	SortID int64 `db:"sort_id" json:"sortID"`
	//标签
	Tags pq.Int64Array `db:"tags" json:"tags"`
	//标题
	Title string `db:"title" json:"title"`
	//封面文件
	CoverFileID int64 `db:"cover_file_id" json:"coverFileID"`
	//内容
	Des string `db:"des" json:"des"`
	//关联阅读引导ID
	BindIDs pq.Int64Array `db:"bind_ids" json:"bindIDs"`
	//关联阅读引导mark
	BindMarks pq.StringArray `db:"bind_marks" json:"bindMarks"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

FieldsContent 内容设计 设置一整套内容和介绍文案,方便调取查阅

func CreateContent

func CreateContent(args *ArgsCreateContent) (data FieldsContent, err error)

func GetContentByID

func GetContentByID(args *ArgsGetContentByID) (data FieldsContent, err error)

GetContentByID 获取ID

func GetContentByMark

func GetContentByMark(args *ArgsGetContentByMark) (data FieldsContent, err error)

func GetContentList

func GetContentList(args *ArgsGetContentList) (dataList []FieldsContent, dataCount int64, err error)

func GetContentMore

func GetContentMore(args *ArgsGetContentMore) (dataList []FieldsContent, err error)

func GetContentMoreByMark

func GetContentMoreByMark(args *ArgsGetContentMoreByMark) (dataList []FieldsContent, err error)

type FieldsMsg

type FieldsMsg struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID"`
	//是否为用户消息,否为系统消息
	IsSelf bool `db:"is_self" json:"isSelf"`
	//聊天内容
	Content string `db:"content" json:"content"`
	//携带文件
	FileID int64 `db:"file_id" json:"fileID"`
	//关联阅读引导ID
	BindIDs pq.Int64Array `db:"bind_ids" json:"bind_ids"`
}

Jump to

Keyboard shortcuts

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