model

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDemo

type IDemo interface {
	// 查询分页数据
	QueryPage(ctx context.Context, param schema.DemoQueryParam, pageIndex, pageSize uint) (int64, []*schema.DemoQueryResult, error)
	// Get 查询指定数据
	Get(ctx context.Context, recordID string) (*schema.Demo, error)
	// Check 检查数据是否存在
	Check(ctx context.Context, recordID string) (bool, error)
	// Create 创建数据
	Create(ctx context.Context, item *schema.Demo) error
	// Update 更新数据
	Update(ctx context.Context, recordID string, info map[string]interface{}) error
	// Delete 删除数据
	Delete(ctx context.Context, recordID string) error
}

IDemo 示例程序

type IMenu

type IMenu interface {
	// 查询分页数据
	QueryPage(ctx context.Context, params schema.MenuQueryParam, pageIndex, pageSize uint) (int64, []*schema.MenuQueryResult, error)
	// 查询选择数据
	QuerySelect(ctx context.Context, params schema.MenuSelectQueryParam) ([]*schema.MenuSelectQueryResult, error)
	// Get 查询指定数据
	Get(ctx context.Context, recordID string) (*schema.Menu, error)
	// Check 检查数据是否存在
	Check(ctx context.Context, recordID string) (bool, error)
	// 检查编号是否存在
	CheckCode(ctx context.Context, code string, parentID string) (bool, error)
	// 根据父级查询分级码
	QueryLevelCodesByParentID(parentID string) ([]string, error)
	// 检查子级是否存在
	CheckChild(ctx context.Context, parentID string) (bool, error)
	// Create 创建数据
	Create(ctx context.Context, item *schema.Menu) error
	// Update 更新数据
	Update(ctx context.Context, recordID string, info map[string]interface{}) error
	// 更新数据
	UpdateWithLevelCode(ctx context.Context, recordID string, info map[string]interface{}, oldLevelCode, newLevelCode string) error
	// Delete 删除数据
	Delete(ctx context.Context, recordID string) error
}

IMenu 菜单管理

type IRole

type IRole interface {
	// 查询分页数据
	QueryPage(ctx context.Context, params schema.RoleQueryParam, pageIndex, pageSize uint) (int64, []*schema.RoleQueryResult, error)
	// 查询选择数据
	QuerySelect(ctx context.Context, params schema.RoleSelectQueryParam) ([]*schema.RoleSelectQueryResult, error)
	// 查询指定数据
	Get(ctx context.Context, recordID string, includeMenuIDs bool) (*schema.Role, error)
	// Check 检查数据是否存在
	Check(ctx context.Context, recordID string) (bool, error)
	// 检查名称
	CheckName(ctx context.Context, name string) (bool, error)
	// 创建数据
	Create(ctx context.Context, item *schema.Role) error
	// 更新数据
	Update(ctx context.Context, recordID string, info map[string]interface{}) error
	// 更新数据
	UpdateWithMenuIDs(ctx context.Context, recordID string, info map[string]interface{}, menuIDs []string) error
	// 删除数据
	Delete(ctx context.Context, recordID string) error
}

IRole 角色管理

type IUser

type IUser interface {
	// 查询分页数据
	QueryPage(ctx context.Context, params schema.UserQueryParam, pageIndex, pageSize uint) (int64, []*schema.UserQueryResult, error)
	// 查询指定数据
	Get(ctx context.Context, recordID string, includeRoleIDs bool) (*schema.User, error)
	// Check 检查数据是否存在
	Check(ctx context.Context, recordID string) (bool, error)
	// 检查用户名
	CheckUserName(ctx context.Context, userName string) (bool, error)
	// 根据用户名查询指定数据
	GetByUserName(ctx context.Context, userName string, includeRoleIDs bool) (*schema.User, error)
	// 检查角色下是否存在用户
	CheckByRoleID(ctx context.Context, roleID string) (bool, error)
	// 查询用户角色
	QueryUserRoles(ctx context.Context, params schema.UserRoleQueryParam) ([]*schema.UserRole, error)
	// 创建数据
	Create(ctx context.Context, item *schema.User) error
	// 更新数据
	Update(ctx context.Context, recordID string, info map[string]interface{}) error
	// 更新数据
	UpdateWithRoleIDs(ctx context.Context, recordID string, info map[string]interface{}, roleIDs []string) error
	// 删除数据
	Delete(ctx context.Context, recordID string) error
}

IUser 用户管理

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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