model

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CategoryHeaderMenu    = "header_menu"
	CategoryLogIn         = "login"
	CategoryBanner        = "banner"
	CategoryTermOfUse     = "term_of_use"
	CategoryPrivatePolicy = "private_policy"
	CategoryIcp           = "icp"
	CategoryPolice        = "police"
	CategoryFooter        = "footer"
)
View Source
const (
	LinkInner = iota
	LinkOuter
)

Variables

This section is empty.

Functions

func Tables

func Tables() (t []interface{})

Types

type EnterpriseWebSite added in v0.3.0

type EnterpriseWebSite struct {
	app.Pk
	Name            string `orm:"column(name);null"`
	PageKeywords    string `orm:"column(page_keywords);null"`
	PageDescription string `orm:"column(page_description);null"`
	PageTitle       string `orm:"column(page_title);null"`
	PageAuthor      string `orm:"column(page_author);null"`
	BannerTitle     string `orm:"column(banner_title);null"`
	BannerSubTitle  string `orm:"column(banner_sub_title);null"`
	BannerMedia     string `orm:"column(banner_media);null"`
	CompanyDescribe string `orm:"column(company_describe);null"`
	CompanyAddress  string `orm:"column(company_address);null"`
	CompanyTel      string `orm:"column(company_tel);null"`
	CompanyEmail    string `orm:"column(company_email);null"`
	app.TableChangeInfo
}

type GroupDetail added in v0.1.0

type GroupDetail struct {
	app.Pk
	WebSiteId       int `orm:"column(web_site);null"`
	ResourceId      int `orm:"column(resource_id);null"`
	ResourceGroupId int `orm:"column(resource_group_id);null"`
	app.TableInfo
}

func GetFooterGroupDetails added in v0.1.0

func GetFooterGroupDetails(webSite int) (gd []GroupDetail, err error)

type Resource

type Resource struct {
	app.Pk
	WebSiteId int    `orm:"column(web_site);null"`
	Name      string `orm:"column(name);null"`
	Url       string `orm:"column(url);null"`
	OutLink   int    `orm:"column(out_link);null"`
	Media     string `orm:"column(media);null"`
	Category  string `orm:"column(category);null"` // 类型
	Index     int    `orm:"column(index);null"`    // 排序
	app.TableChangeInfo
}
func AddLink(ctx persistence.TxContext, d Resource, isOuterLink bool) (link Resource, err error)
func DeleteLink(ctx persistence.TxContext, id int) (link Resource, err error)

func GetFooterResources added in v0.1.0

func GetFooterResources(webSite int) (r []Resource, err error)

func GetResource

func GetResource(webSite int, category string) (link Resource, err error)

func GetResources

func GetResources(webSite int, category string) (link []Resource, err error)
func UpdateLink(ctx persistence.TxContext, d Resource) (link Resource, err error)

type ResourceGroup added in v0.1.0

type ResourceGroup struct {
	app.Pk
	WebSiteId int    `orm:"column(web_site);null"`
	Name      string `orm:"column(name);null"`
	Index     int    `orm:"column(index);null"` // 排序
	app.TableChangeInfo
}

func GetFooterGroups added in v0.1.0

func GetFooterGroups(webSite int) (gp []ResourceGroup, err error)

Jump to

Keyboard shortcuts

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