approveflow/app/provider/flow_instance/repository.go

22 lines
625 B
Go
Raw Normal View History

2024-11-14 17:02:41 +08:00
package flow_instance
import (
"approveflow/app/provider/flow_instance/model"
"context"
)
const (
InstanceRepositoryKey = "InstanceRepositoryKey"
)
type FlowInstanceRepository interface {
// SaveInstance 保存审批流程实例
SaveInstance(ctx context.Context, flow *model.ApprovalInstance) error
// GetInstanceByID 根据流程 ID 获取审批流程实例
GetInstanceByID(ctx context.Context, id int64) (*model.ApprovalInstance, error)
// GetInstancePage 实例分页查询
GetInstancePage(ctx context.Context, pageNum, pageSize int, flow *model.ApprovalInstance) ([]*model.ApprovalInstance, int64, error)
}