approveflow/app/provider/flow_definition/repository.go

34 lines
1.1 KiB
Go

package flow_definition
import "context"
const (
FlowRepositoryKey = "FlowDefinition"
)
type FlowRepository interface {
// SaveFlow 保存审批流程模板
SaveFlow(ctx context.Context, flow *ApprovalFlow) error
// GetFlowByID 根据流程 ID 获取审批流程模板
GetFlowByID(ctx context.Context, id int64) (*ApprovalFlow, error)
// ListFlows 获取所有审批流程模板列表
ListFlows(ctx context.Context, pageNum, pageSize int, flow *ApprovalFlow) ([]*ApprovalFlow, int64, error)
// UpdateFlow 更新审批流程模板
//UpdateFlow(ctx context.Context, flow *ApprovalFlow) error
// FindFlowsByName 根据流程名称模糊查询审批流程模板
//FindFlowsByName(ctx context.Context, name string) ([]*ApprovalFlow, error)
// AddStepToFlow 添加一个步骤到指定流程中
//AddStepToFlow(ctx context.Context, flowID int64, step *ApprovalStep) error
// RemoveStepFromFlow 从指定流程中移除某个步骤
//RemoveStepFromFlow(ctx context.Context, flowID, stepID int64) error
// GetSteps 获取指定流程的所有步骤
//GetSteps(ctx context.Context, flowID int64) ([]*ApprovalStep, error)
}