-
Notifications
You must be signed in to change notification settings - Fork 12
/
b_page_manager.go
32 lines (30 loc) · 1.34 KB
/
b_page_manager.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package bll
import (
"context"
"github.com/tanjiancheng/gin-amis-admin/internal/app/schema"
)
// IPageManager 页面管理业务逻辑接口
type IPageManager interface {
// 初始化菜单数据
InitData(ctx context.Context, dataFile string) error
// 查询数据
Query(ctx context.Context, params schema.PageManagerQueryParam, opts ...schema.PageManagerQueryOptions) (*schema.PageManagerQueryResult, error)
// 根据路由查询指定数据
GetByRoute(ctx context.Context, id string, opts ...schema.PageManagerQueryOptions) (*schema.PageManager, error)
// 查询指定数据
Get(ctx context.Context, id string, opts ...schema.PageManagerQueryOptions) (*schema.PageManager, error)
// 创建数据
Create(ctx context.Context, item schema.PageManager) error
// 更新数据
Update(ctx context.Context, id string, item schema.PageManager) error
// 删除数据
Delete(ctx context.Context, id string) error
// 更新状态
UpdateStatus(ctx context.Context, id string, status int) error
// 获取最后一条记录的ide
GetLastId(ctx context.Context) (int, error)
// 获取历史版本
History(ctx context.Context, params schema.PageVersionHistoryQueryParam, opts ...schema.PageVersionHistoryQueryOptions) (*schema.PageVersionHistoryQueryResult, error)
// 根据版本信息回滚
Revert(ctx context.Context, pageVersionHistoryId string) error
}