42 lines
1.5 KiB
Go
42 lines
1.5 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成service操作代码。
|
|||
|
// 生成日期:2023-09-16 10:32:04
|
|||
|
// 生成路径: internal/app/system/service/document.go
|
|||
|
// 生成人:gfast
|
|||
|
// desc:母板
|
|||
|
// company:云南奇讯科技有限公司
|
|||
|
// ==========================================================================
|
|||
|
|
|||
|
package service
|
|||
|
|
|||
|
import (
|
|||
|
"context"
|
|||
|
"github.com/tiger1103/gfast/v3/api/v1/system"
|
|||
|
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
|||
|
)
|
|||
|
|
|||
|
type IDocument interface {
|
|||
|
List(ctx context.Context, req *system.DocumentSearchReq) (res *system.DocumentSearchRes, err error)
|
|||
|
GetById(ctx context.Context, Id int) (res *model.DocumentInfoRes, err error)
|
|||
|
Add(ctx context.Context, req *system.DocumentAddReq) (err error)
|
|||
|
Edit(ctx context.Context, req *system.DocumentEditReq) (err error)
|
|||
|
Delete(ctx context.Context, Id []int) (err error)
|
|||
|
TreeStructureFunc(ctx context.Context, req *system.TreeStructureReq) (res *system.TreeStructureRes, err error)
|
|||
|
AllList(ctx context.Context, req *system.AllDocumentSearchReq) (res *system.AllDocumentSearchRes, err error)
|
|||
|
TemplateRecycleBinFunc(ctx context.Context, req *system.TemplateRecycleBinReq) (err error)
|
|||
|
NewFolderFunc(ctx context.Context, req *system.NewFolderReq) (err error)
|
|||
|
}
|
|||
|
|
|||
|
var localDocument IDocument
|
|||
|
|
|||
|
func Document() IDocument {
|
|||
|
if localDocument == nil {
|
|||
|
panic("implement not found for interface IDocument, forgot register?")
|
|||
|
}
|
|||
|
return localDocument
|
|||
|
}
|
|||
|
|
|||
|
func RegisterDocument(i IDocument) {
|
|||
|
localDocument = i
|
|||
|
}
|