13 lines
373 B
Go
13 lines
373 B
Go
package approval
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// Repository 定义通用审批实例的写侧持久化接缝。
|
|
type Repository interface {
|
|
Create(ctx context.Context, instance *Instance) error
|
|
GetForUpdate(ctx context.Context, instanceID uint) (*Instance, error)
|
|
SaveDecision(ctx context.Context, instance *Instance, expectedStatus int, expectedVersion int) (bool, error)
|
|
}
|