feat(t222): add freight ingestion admin flow
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package usecase
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"cmroubao/backend-api/internal/domain"
|
||||
)
|
||||
|
||||
type FreightSource interface {
|
||||
QueryOrder(context.Context, string) (domain.FreightSourceBatch, error)
|
||||
}
|
||||
|
||||
type FreightRepository interface {
|
||||
CreateFreightSync(
|
||||
context.Context,
|
||||
domain.FreightSyncRun,
|
||||
string,
|
||||
string,
|
||||
) (domain.FreightSyncRun, bool, error)
|
||||
StartFreightSync(context.Context, string, time.Time) error
|
||||
CompleteFreightSync(
|
||||
context.Context,
|
||||
domain.FreightSyncRun,
|
||||
domain.FreightImportBatch,
|
||||
time.Time,
|
||||
) error
|
||||
FailFreightSync(context.Context, string, string, time.Time) error
|
||||
RecoverFreightSyncs(context.Context, time.Time) (int64, error)
|
||||
GetFreightSync(
|
||||
context.Context,
|
||||
string,
|
||||
string,
|
||||
) (domain.FreightSyncRun, error)
|
||||
ListFreightOrders(
|
||||
context.Context,
|
||||
string,
|
||||
int,
|
||||
) ([]domain.FreightOrder, error)
|
||||
GetFreightOrder(
|
||||
context.Context,
|
||||
string,
|
||||
string,
|
||||
) (domain.FreightOrderDetail, error)
|
||||
}
|
||||
Reference in New Issue
Block a user