models

package
v0.0.0-...-49cc056 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IMG_TYPE  = "img"
	FILE_TYPE = "file"
)

Variables

View Source
var ErrCategoryNotExists = errors.New("category not exists")

Functions

This section is empty.

Types

type AdModel

type AdModel struct {
	// contains filtered or unexported fields
}

func NewAdModel

func NewAdModel() *AdModel

func (*AdModel) Add

func (l *AdModel) Add(data *tables.Advert) int64

func (*AdModel) Delete

func (l *AdModel) Delete(id []int64) bool

func (*AdModel) Get

func (l *AdModel) Get(id int64) *tables.Advert

func (*AdModel) GetList

func (l *AdModel) GetList(page, limit int) ([]tables.Advert, int64)

func (*AdModel) Update

func (l *AdModel) Update(data *tables.Advert) bool

type AdSpaceModel

type AdSpaceModel struct {
	// contains filtered or unexported fields
}

func NewAdSpaceModel

func NewAdSpaceModel() *AdSpaceModel

func (*AdSpaceModel) Add

func (l *AdSpaceModel) Add(data *tables.AdvertSpace) int64

func (*AdSpaceModel) All

func (l *AdSpaceModel) All() []tables.AdvertSpace

func (*AdSpaceModel) Delete

func (l *AdSpaceModel) Delete(id int64) bool

func (*AdSpaceModel) Get

func (l *AdSpaceModel) Get(id int64) *tables.AdvertSpace

func (*AdSpaceModel) GetList

func (l *AdSpaceModel) GetList(page, limit int64) ([]tables.AdvertSpace, int64)

func (*AdSpaceModel) Update

func (l *AdSpaceModel) Update(data *tables.AdvertSpace) bool

type AdminModel

type AdminModel struct {
	// contains filtered or unexported fields
}

func NewAdminModel

func NewAdminModel() *AdminModel

func (*AdminModel) EditPassword

func (a *AdminModel) EditPassword(userid int64, password string) bool

编辑密码

func (*AdminModel) GetList

func (a *AdminModel) GetList(where string, page, rows int, order string, sortType string) []tables.Admin

获取管理员列表

func (*AdminModel) GetUserInfo

func (a *AdminModel) GetUserInfo(userid int64) (tables.Admin, error)

获取用户信息

func (*AdminModel) Login

func (a *AdminModel) Login(username, password, ip string) (tables.Admin, error)

Login 登录用户

type AdminRoleModel

type AdminRoleModel struct {
	// contains filtered or unexported fields
}

func NewAdminRoleModel

func NewAdminRoleModel() *AdminRoleModel

func (*AdminRoleModel) AddRole

func (a *AdminRoleModel) AddRole(rolename, description string, disabled, listorder int64) bool

func (*AdminRoleModel) All

func (a *AdminRoleModel) All() map[int64]*tables.AdminRole

func (*AdminRoleModel) CheckRoleName

func (a *AdminRoleModel) CheckRoleName(id int64, rolename string) bool

func (*AdminRoleModel) DeleteRole

func (a *AdminRoleModel) DeleteRole(role tables.AdminRole) bool

func (*AdminRoleModel) GetRoleById

func (a *AdminRoleModel) GetRoleById(id int64) (tables.AdminRole, error)

func (*AdminRoleModel) List

func (a *AdminRoleModel) List(page, rows int) ([]tables.AdminRole, int64)

func (*AdminRoleModel) UpdateRole

func (a *AdminRoleModel) UpdateRole(role tables.AdminRole) bool

type AttachmentsModel

type AttachmentsModel struct {
	// contains filtered or unexported fields
}

func NewAttachmentsModel

func NewAttachmentsModel() *AttachmentsModel

func (*AttachmentsModel) Delete

func (a *AttachmentsModel) Delete(id int64) bool

func (*AttachmentsModel) GetList

func (a *AttachmentsModel) GetList(keywords string, page, limit int64) (list []tables.Attachments, total int64)

type BaseModel

type BaseModel struct {
	builder.Between
}

type CategoryModel

type CategoryModel struct {
	// contains filtered or unexported fields
}

func NewCategoryModel

func NewCategoryModel() *CategoryModel

func (*CategoryModel) AddCategory

func (c *CategoryModel) AddCategory(category tables.Category) bool

func (*CategoryModel) DeleteById

func (c *CategoryModel) DeleteById(id int64) bool

func (*CategoryModel) GetAll

func (c *CategoryModel) GetAll(withCache bool) []tables.Category

func (*CategoryModel) GetCategory

func (c *CategoryModel) GetCategory(id int64) *tables.Category

func (*CategoryModel) GetCategoryByModelID

func (c *CategoryModel) GetCategoryByModelID(id int64) ([]tables.Category, error)

func (*CategoryModel) GetCategoryFByIdForBE

func (c *CategoryModel) GetCategoryFByIdForBE(id int64) (category *tables.Category, err error)

读取单个分类的信息

func (*CategoryModel) GetContentRightCategoryTree

func (c *CategoryModel) GetContentRightCategoryTree(categorys []tables.Category, parentid int64) []map[string]interface{}

取得内容管理右部分类tree结构

func (*CategoryModel) GetNextCategory

func (c *CategoryModel) GetNextCategory(parentid int64) []tables.Category

func (*CategoryModel) GetNextCategoryOnlyCatids

func (c *CategoryModel) GetNextCategoryOnlyCatids(parentid int64, withSelf bool) []int64

func (*CategoryModel) GetPosArr

func (c *CategoryModel) GetPosArr(id int64) []tables.Category

func (*CategoryModel) GetSelectTree

func (c *CategoryModel) GetSelectTree(parentid int64) []map[string]interface{}

func (*CategoryModel) GetTree

func (c *CategoryModel) GetTree(categorys []tables.Category, parentid int64) []map[string]interface{}

func (*CategoryModel) GetUrlPrefix

func (c *CategoryModel) GetUrlPrefix(id int64) string

func (*CategoryModel) GetUrlPrefixWithCategoryArr

func (c *CategoryModel) GetUrlPrefixWithCategoryArr(cats []tables.Category) string

func (*CategoryModel) GetWithDirForBE

func (c *CategoryModel) GetWithDirForBE(dir string) *tables.Category

func (*CategoryModel) IsSonCategory

func (c *CategoryModel) IsSonCategory(id, parentid int64) bool

判断是否是子分类

func (*CategoryModel) UpdateCategory

func (c *CategoryModel) UpdateCategory(category *tables.Category) bool

type DocumentModel

type DocumentModel struct {
	// contains filtered or unexported fields
}

func NewDocumentModel

func NewDocumentModel() *DocumentModel

func (*DocumentModel) DeleteByID

func (d *DocumentModel) DeleteByID(id int64) (bool, error)

func (*DocumentModel) GetAllForBE

func (d *DocumentModel) GetAllForBE() []tables.DocumentModel

func (*DocumentModel) GetByID

func (d *DocumentModel) GetByID(id int64) *tables.DocumentModel

func (*DocumentModel) GetByIDForBE

func (d *DocumentModel) GetByIDForBE(id int64) *tables.DocumentModel

func (*DocumentModel) GetList

func (d *DocumentModel) GetList(page, limit int64) (list []tables.DocumentModel, total int64)

func (*DocumentModel) GetWithTableNameForBE

func (d *DocumentModel) GetWithTableNameForBE(name string) *tables.DocumentModel

type DocumentModelDslModel

type DocumentModelDslModel struct {
	// contains filtered or unexported fields
}

func NewDocumentFieldDslModel

func NewDocumentFieldDslModel() *DocumentModelDslModel

func (*DocumentModelDslModel) DeleteByMID

func (w *DocumentModelDslModel) DeleteByMID(mid int64) bool

func (*DocumentModelDslModel) GetList

type DocumentModelFieldModel

type DocumentModelFieldModel struct {
	// contains filtered or unexported fields
}

func NewDocumentModelFieldModel

func NewDocumentModelFieldModel() *DocumentModelFieldModel

func (*DocumentModelFieldModel) GetList

func (w *DocumentModelFieldModel) GetList(page, limit int64) (list []*tables.DocumentModelField, total int64)

func (*DocumentModelFieldModel) GetMap

type LinkModel

type LinkModel struct {
	// contains filtered or unexported fields
}

func NewLinkModel

func NewLinkModel() *LinkModel

func (*LinkModel) Add

func (l *LinkModel) Add(data *tables.Link) int64

func (*LinkModel) Delete

func (l *LinkModel) Delete(id int64) bool

func (*LinkModel) Get

func (l *LinkModel) Get(id int64) *tables.Link

func (*LinkModel) GetList

func (l *LinkModel) GetList(page, limit int64) ([]tables.Link, int64)

func (*LinkModel) Update

func (l *LinkModel) Update(data *tables.Link) bool

type LogModel

type LogModel struct {
	// contains filtered or unexported fields
}

func NewLogModel

func NewLogModel() *LogModel

func (*LogModel) DeleteAll

func (l *LogModel) DeleteAll() bool

func (*LogModel) DeleteBeforeByDate

func (l *LogModel) DeleteBeforeByDate(date string) bool

func (*LogModel) GetList

func (l *LogModel) GetList(page, limit int64) ([]tables.Log, int64)

type MemberModel

type MemberModel struct {
	// contains filtered or unexported fields
}

func NewMemberModel

func NewMemberModel() *MemberModel

func (*MemberModel) Add

func (m *MemberModel) Add(members *tables.Member) int64

func (*MemberModel) Edit

func (m *MemberModel) Edit(id int64, members *tables.Member) bool

func (*MemberModel) Exist

func (m *MemberModel) Exist(account string) bool

func (*MemberModel) GetInfo

func (m *MemberModel) GetInfo(id int64) *tables.Member

func (*MemberModel) GetList

func (m *MemberModel) GetList(page, limit int64) (list []tables.Member, total int64)
type MenuModel struct {
	// contains filtered or unexported fields
}

func NewMenuModel

func NewMenuModel() *MenuModel
func (m MenuModel) CheckName(name string) bool

检查菜单名称是否存在

func (m MenuModel) GetAll(menuIdList []int64) []tables.Menu
func (m MenuModel) GetInfo(id int64) (*tables.Menu, bool)
func (m MenuModel) GetParentIds(id int64, result string) string

获取菜单父级id

func (m MenuModel) GetSelectTree(menus []tables.Menu, parentid int64) []map[string]interface{}

获取selectTree

func (m MenuModel) GetTree(menus []tables.Menu, parentid int64) []tables.Menu

type PageModel

type PageModel struct {
	// contains filtered or unexported fields
}

func NewPageModel

func NewPageModel() *PageModel

func (*PageModel) AddPage

func (p *PageModel) AddPage(page *tables.Page) bool

func (*PageModel) DelPage

func (p *PageModel) DelPage(catid int64) bool

func (*PageModel) GetPage

func (p *PageModel) GetPage(catid int64) *tables.Page

func (*PageModel) UpdatePage

func (p *PageModel) UpdatePage(page *tables.Page) bool

type WechatMemberModel

type WechatMemberModel struct {
	// contains filtered or unexported fields
}

func NewWechatMemberModel

func NewWechatMemberModel() *WechatMemberModel

func (*WechatMemberModel) GetInfo

func (w *WechatMemberModel) GetInfo(id int64) tables.WechatMember

func (*WechatMemberModel) GetList

func (w *WechatMemberModel) GetList(page, limit int64) (list []tables.WechatMember, total int64)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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