feat: 增加档口入库码单表导入 (#231)
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
package model
|
||||
|
||||
// InnerCodeStatus 是档口入库码从导入到远端核验的单表状态。
|
||||
type InnerCodeStatus string
|
||||
|
||||
const (
|
||||
InnerCodePending InnerCodeStatus = "pending"
|
||||
InnerCodeReady InnerCodeStatus = "ready"
|
||||
InnerCodeApplying InnerCodeStatus = "applying"
|
||||
InnerCodeUpdated InnerCodeStatus = "updated"
|
||||
InnerCodeAlreadyFilled InnerCodeStatus = "already_filled"
|
||||
InnerCodeSkipped InnerCodeStatus = "skipped"
|
||||
InnerCodeFailed InnerCodeStatus = "failed"
|
||||
InnerCodeNeedsCheck InnerCodeStatus = "needs_check"
|
||||
)
|
||||
|
||||
// InnerCodeRecord 保存一张线下标签在导入、匹配和回写过程中的全部必要信息。
|
||||
// Excel 只是载体,原文件不会进入数据库。
|
||||
type InnerCodeRecord struct {
|
||||
ID int64
|
||||
BusinessDate string
|
||||
SourceRow int
|
||||
PrintSequence int
|
||||
OrderNumber string
|
||||
ShopName string
|
||||
Stall string
|
||||
SpecRaw string
|
||||
SpecKey string
|
||||
InnerCode string
|
||||
SourceDuplicateCount int
|
||||
StockID int64
|
||||
DetailID int64
|
||||
SybSpec string
|
||||
SybSKU string
|
||||
SybVariationSKU string
|
||||
PurchasePlatform string
|
||||
PurchaseCode string
|
||||
RemoteInnerCode string
|
||||
Status InnerCodeStatus
|
||||
ResultMessage string
|
||||
CreatedByUserID string
|
||||
AppliedByUserID string
|
||||
PlannedAt string
|
||||
ApplyStartedAt string
|
||||
AppliedAt string
|
||||
CreatedAt string
|
||||
UpdatedAt string
|
||||
}
|
||||
|
||||
// InnerCodeImportRow 是通过校验后交给 repository 幂等写入的一行。
|
||||
type InnerCodeImportRow struct {
|
||||
BusinessDate string
|
||||
SourceRow int
|
||||
PrintSequence int
|
||||
OrderNumber string
|
||||
ShopName string
|
||||
Stall string
|
||||
SpecRaw string
|
||||
SpecKey string
|
||||
InnerCode string
|
||||
SourceDuplicateCount int
|
||||
CreatedByUserID string
|
||||
}
|
||||
Reference in New Issue
Block a user