feat(t240): cache freight item images
This commit is contained in:
@@ -18,6 +18,16 @@ const (
|
||||
FreightSyncFailed FreightSyncStatus = "FAILED"
|
||||
)
|
||||
|
||||
type FreightItemImageStatus string
|
||||
|
||||
const (
|
||||
FreightItemImageNone FreightItemImageStatus = "NONE"
|
||||
FreightItemImagePending FreightItemImageStatus = "PENDING"
|
||||
FreightItemImageReady FreightItemImageStatus = "READY"
|
||||
FreightItemImageMissing FreightItemImageStatus = "MISSING"
|
||||
FreightItemImageFailed FreightItemImageStatus = "FAILED"
|
||||
)
|
||||
|
||||
type FreightSyncRun struct {
|
||||
ID string
|
||||
CreatorSubject string
|
||||
@@ -69,6 +79,8 @@ type FreightOrderItem struct {
|
||||
ProductThumbRef *string
|
||||
OriginalUnitPriceMinor *int64
|
||||
OriginalCurrency string
|
||||
ImageStatus FreightItemImageStatus
|
||||
ImageErrorCode *string
|
||||
PurchaseStatus *string
|
||||
CanonicalSHA256 string
|
||||
Revision int
|
||||
@@ -79,6 +91,26 @@ type FreightOrderItem struct {
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type FreightItemImageJob struct {
|
||||
CreatorSubject string
|
||||
FreightOrderItemID string
|
||||
ProductThumbRef string
|
||||
}
|
||||
|
||||
type FreightItemImage struct {
|
||||
CreatorSubject string
|
||||
FreightOrderItemID string
|
||||
ProductThumbRef string
|
||||
Status FreightItemImageStatus
|
||||
MediaType string
|
||||
SizeBytes int64
|
||||
SHA256 string
|
||||
StorageKey string
|
||||
ErrorCode *string
|
||||
AttemptCount int
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type FreightOrderDetail struct {
|
||||
Order FreightOrder
|
||||
Items []FreightOrderItem
|
||||
|
||||
Reference in New Issue
Block a user