Documentation ¶
Index ¶
- Constants
- Variables
- type AdModel
- type AdSpaceModel
- func (l *AdSpaceModel) Add(data *tables.AdvertSpace) int64
- func (l *AdSpaceModel) All() []tables.AdvertSpace
- func (l *AdSpaceModel) Delete(id int64) bool
- func (l *AdSpaceModel) Get(id int64) *tables.AdvertSpace
- func (l *AdSpaceModel) GetList(page, limit int64) ([]tables.AdvertSpace, int64)
- func (l *AdSpaceModel) Update(data *tables.AdvertSpace) bool
- type AdminModel
- func (a *AdminModel) EditPassword(userid int64, password string) bool
- func (a *AdminModel) GetList(where string, page, rows int, order string, sortType string) []tables.Admin
- func (a *AdminModel) GetUserInfo(userid int64) (tables.Admin, error)
- func (a *AdminModel) Login(username, password, ip string) (tables.Admin, error)
- type AdminRoleModel
- func (a *AdminRoleModel) AddRole(rolename, description string, disabled, listorder int64) bool
- func (a *AdminRoleModel) All() map[int64]*tables.AdminRole
- func (a *AdminRoleModel) CheckRoleName(id int64, rolename string) bool
- func (a *AdminRoleModel) DeleteRole(role tables.AdminRole) bool
- func (a *AdminRoleModel) GetRoleById(id int64) (tables.AdminRole, error)
- func (a *AdminRoleModel) List(page, rows int) ([]tables.AdminRole, int64)
- func (a *AdminRoleModel) UpdateRole(role tables.AdminRole) bool
- type AttachmentsModel
- type BaseModel
- type CategoryModel
- func (c *CategoryModel) AddCategory(category tables.Category) bool
- func (c *CategoryModel) DeleteById(id int64) bool
- func (c *CategoryModel) GetAll(withCache bool) []tables.Category
- func (c *CategoryModel) GetCategory(id int64) *tables.Category
- func (c *CategoryModel) GetCategoryByModelID(id int64) ([]tables.Category, error)
- func (c *CategoryModel) GetCategoryFByIdForBE(id int64) (category *tables.Category, err error)
- func (c *CategoryModel) GetContentRightCategoryTree(categorys []tables.Category, parentid int64) []map[string]interface{}
- func (c *CategoryModel) GetNextCategory(parentid int64) []tables.Category
- func (c *CategoryModel) GetNextCategoryOnlyCatids(parentid int64, withSelf bool) []int64
- func (c *CategoryModel) GetPosArr(id int64) []tables.Category
- func (c *CategoryModel) GetSelectTree(parentid int64) []map[string]interface{}
- func (c *CategoryModel) GetTree(categorys []tables.Category, parentid int64) []map[string]interface{}
- func (c *CategoryModel) GetUrlPrefix(id int64) string
- func (c *CategoryModel) GetUrlPrefixWithCategoryArr(cats []tables.Category) string
- func (c *CategoryModel) GetWithDirForBE(dir string) *tables.Category
- func (c *CategoryModel) IsSonCategory(id, parentid int64) bool
- func (c *CategoryModel) UpdateCategory(category *tables.Category) bool
- type DocumentModel
- func (d *DocumentModel) DeleteByID(id int64) (bool, error)
- func (d *DocumentModel) GetAllForBE() []tables.DocumentModel
- func (d *DocumentModel) GetByID(id int64) *tables.DocumentModel
- func (d *DocumentModel) GetByIDForBE(id int64) *tables.DocumentModel
- func (d *DocumentModel) GetList(page, limit int64) (list []tables.DocumentModel, total int64)
- func (d *DocumentModel) GetWithTableNameForBE(name string) *tables.DocumentModel
- type DocumentModelDslModel
- type DocumentModelFieldModel
- type LinkModel
- type LogModel
- type MemberModel
- func (m *MemberModel) Add(members *tables.Member) int64
- func (m *MemberModel) Edit(id int64, members *tables.Member) bool
- func (m *MemberModel) Exist(account string) bool
- func (m *MemberModel) GetInfo(id int64) *tables.Member
- func (m *MemberModel) GetList(page, limit int64) (list []tables.Member, total int64)
- type 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
- func (m MenuModel) GetSelectTree(menus []tables.Menu, parentid int64) []map[string]interface{}
- func (m MenuModel) GetTree(menus []tables.Menu, parentid int64) []tables.Menu
- type PageModel
- type WechatMemberModel
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
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)
获取用户信息
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) 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 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) 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) 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 ¶
func (w *DocumentModelDslModel) GetList(mid int64) []tables.DocumentModelDsl
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 ¶
func (w *DocumentModelFieldModel) GetMap() map[int64]*tables.DocumentModelField
type LinkModel ¶
type LinkModel struct {
// contains filtered or unexported fields
}
func NewLinkModel ¶
func NewLinkModel() *LinkModel
type LogModel ¶
type LogModel struct {
// contains filtered or unexported fields
}
func NewLogModel ¶
func NewLogModel() *LogModel
func (*LogModel) DeleteBeforeByDate ¶
type MemberModel ¶
type MemberModel struct {
// contains filtered or unexported fields
}
func NewMemberModel ¶
func NewMemberModel() *MemberModel
func (*MemberModel) Exist ¶
func (m *MemberModel) Exist(account string) bool
type MenuModel ¶
type MenuModel struct {
// contains filtered or unexported fields
}
func NewMenuModel ¶
func NewMenuModel() *MenuModel
func (MenuModel) GetParentIds ¶
获取菜单父级id
func (MenuModel) GetSelectTree ¶
获取selectTree
type PageModel ¶
type PageModel struct {
// contains filtered or unexported fields
}
func NewPageModel ¶
func NewPageModel() *PageModel
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)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.