67 lines
2.1 KiB
Go
67 lines
2.1 KiB
Go
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 保存一个顺运宝商品明细在导入、匹配和回写过程中的全部必要信息。
|
|
// 同一明细有多件时,InnerCode 是按 Excel 行顺序用英文逗号连接的多个单件码。
|
|
// 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
|
|
DeletedAt string
|
|
DeletedByUserID 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
|
|
}
|