model_menu

package
v0.0.0-...-9e8b3cb Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//MenuMenuAll    = "MENU_ALL"
	MenuPermissionSelect = "MENU_SELECT"
	MenuPermissionCreate = "MENU_CREATE"
	MenuPermissionEdit   = "MENU_EDIT"
	MenuPermissionDelete = "MENU_DELETE"

	MenuTypeList  = 1
	MenuTypeTree  = 2
	MenuTypeBuild = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Menu struct {
	Id         int64             `json:"id,omitempty" bson:"_id,omitempty"`
	PId        int64             `json:"pid,omitempty" bson:"pid"` //父节点ID
	Sort       int               `json:"sort" bson:"sort"`
	Icon       string            `json:"icon,omitempty" bson:"icon,omitempty"`
	Name       string            `json:"name,omitempty" bson:"name,omitempty"`
	Label      string            `json:"label,omitempty" bson:"label,omitempty"`
	Path       string            `json:"path,omitempty" bson:"path,omitempty"`
	AlwaysShow bool              `json:"alwaysShow" bson:"alwaysShow"`
	Component  string            `json:"component,omitempty" bson:"component,omitempty"`
	IFrame     bool              `json:"iframe" bson:"iframe"`
	CreateTime int64             `json:"createTime,omitempty" bson:"createTime,omitempty"`
	Children   []Menu            `json:"children,omitempty" bson:"children,omitempty"`
	Roles      []model_role.Role `json:"roles,omitempty" bson:"roles,omitempty"`
	Meta       meta              `json:"meta,omitempty" bson:"meta,omitempty"`
	// contains filtered or unexported fields
}
func (m Menu) Exist() bool
func (m Menu) FetchTreeList(selector interface{}) (results []Menu, err error)
func (m Menu) FindAll(query, selector interface{}) (results []Menu, err error)
func (m Menu) FindOneTree() (menu Menu, err error)
func (m Menu) FindPageBuildFilter(roles []model_role.Role, page, limit int, query, selector interface{}, fields ...string) ([]Menu, error)
func (m Menu) FindPageListFilter(page, limit int, query, selector interface{}, fields ...string) ([]Menu, error)
func (m Menu) FindPageTreeFilter(page, limit int, query, selector interface{}, fields ...string) ([]Menu, error)
func (m Menu) Insert() (int64, error)
func (m Menu) Remove() error
func (m Menu) ToJson() string
func (m Menu) TotalCount(query, selector interface{}) (int, error)
func (m Menu) Update() error

Jump to

Keyboard shortcuts

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