feat(t224): add incremental freight sync
This commit is contained in:
@@ -5,6 +5,7 @@ import "time"
|
||||
const (
|
||||
FreightSourceShunyunbao = "SHUNYUNBAO"
|
||||
FreightSyncOrderNumber = "ORDER_NUMBER"
|
||||
FreightSyncCreatedRange = "CREATED_RANGE"
|
||||
)
|
||||
|
||||
type FreightSyncStatus string
|
||||
@@ -17,19 +18,22 @@ const (
|
||||
)
|
||||
|
||||
type FreightSyncRun struct {
|
||||
ID string
|
||||
CreatorSubject string
|
||||
CreatedByUserID string
|
||||
Mode string
|
||||
OrderNumber string
|
||||
QuerySHA256 string
|
||||
Status FreightSyncStatus
|
||||
ErrorCode *string
|
||||
OrderCount int
|
||||
ItemCount int
|
||||
CreatedAt time.Time
|
||||
StartedAt *time.Time
|
||||
FinishedAt *time.Time
|
||||
ID string
|
||||
CreatorSubject string
|
||||
CreatedByUserID string
|
||||
Mode string
|
||||
OrderNumber string
|
||||
CreatedFrom string
|
||||
CreatedTo string
|
||||
WatermarkThrough *time.Time
|
||||
QuerySHA256 string
|
||||
Status FreightSyncStatus
|
||||
ErrorCode *string
|
||||
OrderCount int
|
||||
ItemCount int
|
||||
CreatedAt time.Time
|
||||
StartedAt *time.Time
|
||||
FinishedAt *time.Time
|
||||
}
|
||||
|
||||
type FreightOrder struct {
|
||||
@@ -84,7 +88,17 @@ type FreightSourceBatch struct {
|
||||
}
|
||||
|
||||
type FreightSourceQuery struct {
|
||||
Mode string `json:"mode"`
|
||||
Mode string `json:"mode"`
|
||||
CreatedFrom *string `json:"created_from"`
|
||||
CreatedTo *string `json:"created_to"`
|
||||
}
|
||||
|
||||
type FreightSyncWatermark struct {
|
||||
CreatorSubject string
|
||||
SourceSystem string
|
||||
LastSuccessfulTo time.Time
|
||||
LastSuccessfulRunID string
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type FreightSourceOrder struct {
|
||||
|
||||
Reference in New Issue
Block a user