- big big refactor.
This commit is contained in:
@@ -8,28 +8,37 @@ type ModelTimeInfo struct {
|
||||
}
|
||||
|
||||
type GoodsOrder struct {
|
||||
ID int64 `orm:"column(id)"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)"`
|
||||
VendorID int `orm:"column(vendor_id)"`
|
||||
VendorStoreID string `orm:"column(vendor_store_id);size(48)"`
|
||||
StoreID int `orm:"column(store_id)"` // 外部系统里记录的 jxstoreid
|
||||
JxStoreID int `orm:"column(jx_store_id)"` // 根据VendorStoreID在本地系统里查询出来的 jxstoreid
|
||||
StoreName string `orm:"size(64)"`
|
||||
SubStoreID int `orm:"column(sub_store_id)"`
|
||||
SubStoreName string `orm:"size(64)"`
|
||||
ShopPrice int64
|
||||
SalePrice int64
|
||||
ConsigneeName string `orm:"size(32)"`
|
||||
ConsigneeMobile string `orm:"size(32)"`
|
||||
SkuCount int
|
||||
Status int
|
||||
VendorStatus string `orm:"size(16)"`
|
||||
LockStatus int
|
||||
CancelApplyReason string `orm:"size(255);null;default(null)"` // null表示没有申请,不为null表示用户正在取消申请
|
||||
WaybillVendorID int `orm:"column(waybill_vendor_id);default(-1)"`
|
||||
OriginalData string `orm:"type(text)"`
|
||||
OrderCreatedAt time.Time `orm:"type(datetime);index"`
|
||||
OrderFinishedAt time.Time `orm:"type(datetime);null;default(null)"`
|
||||
ID int64 `orm:"column(id)"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)"`
|
||||
VendorID int `orm:"column(vendor_id)"`
|
||||
VendorStoreID string `orm:"column(vendor_store_id);size(48)"`
|
||||
StoreID int `orm:"column(store_id)"` // 外部系统里记录的 jxstoreid
|
||||
JxStoreID int `orm:"column(jx_store_id)"` // 根据VendorStoreID在本地系统里查询出来的 jxstoreid
|
||||
StoreName string `orm:"size(64)"`
|
||||
SubStoreID int `orm:"column(sub_store_id)"`
|
||||
SubStoreName string `orm:"size(64)"`
|
||||
ShopPrice int64 // 单位为分
|
||||
SalePrice int64 // 单位为分
|
||||
Weight int // 单位为克
|
||||
ConsigneeName string `orm:"size(32)"`
|
||||
ConsigneeMobile string `orm:"size(32)"`
|
||||
ConsigneeAddress string `orm:"size(255)"`
|
||||
ConsigneeLng int // 坐标 * (10的六次方)
|
||||
ConsigneeLat int // 坐标 * (10的六次方)
|
||||
CoordinateType int
|
||||
SkuCount int // 商品类别数量,即有多少种商品(注意在某些情况下,相同SKU的商品由于售价不同,也会当成不同商品在这个值里)
|
||||
GoodsCount int // 商品个数
|
||||
Status int // 参见相关常量定义
|
||||
VendorStatus string `orm:"size(16)"`
|
||||
LockStatus int
|
||||
CancelApplyReason string `orm:"size(255)"` // ""表示没有申请,不为null表示用户正在取消申请
|
||||
WaybillVendorID int `orm:"column(waybill_vendor_id)"`
|
||||
WaybillStatus int
|
||||
WaybillVendorStatus string `orm:"size(16)"`
|
||||
DuplicatedCount int // 重复新定单消息数,这个一般不是由于消息重发赞成的(消息重发由OrderStatus过滤),一般是业务逻辑赞成的
|
||||
OriginalData string `orm:"type(text)"`
|
||||
OrderCreatedAt time.Time `orm:"type(datetime);index"`
|
||||
OrderFinishedAt time.Time `orm:"type(datetime)"`
|
||||
ModelTimeInfo
|
||||
}
|
||||
|
||||
@@ -50,6 +59,7 @@ type OrderSku struct {
|
||||
SkuName string `orm:"size(255)"`
|
||||
ShopPrice int64
|
||||
SalePrice int64
|
||||
Weight int // 单位为克
|
||||
OrderCreatedAt time.Time `orm:"type(datetime);index"`
|
||||
}
|
||||
|
||||
@@ -64,7 +74,7 @@ func (o *OrderSku) TableIndex() [][]string {
|
||||
type Waybill struct {
|
||||
ID int64 `orm:"column(id)"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)"`
|
||||
VendorID int `orm:"column(vendor_id)"`
|
||||
OrderVendorID int `orm:"column(order_vendor_id)"`
|
||||
VendorWaybillID string `orm:"column(vendor_waybill_id);size(48)"`
|
||||
VendorWaybillID2 string `orm:"column(vendor_waybill_id2);size(48)"`
|
||||
WaybillVendorID int `orm:"column(waybill_vendor_id)"`
|
||||
@@ -73,8 +83,9 @@ type Waybill struct {
|
||||
Status int
|
||||
VendorStatus string `orm:"size(16)"`
|
||||
ActualFee int64
|
||||
DuplicatedCount int // 重复新定单消息数,这个一般不是由于消息重发赞成的(消息重发由OrderStatus过滤),一般是业务逻辑赞成的
|
||||
WaybillCreatedAt time.Time `orm:"type(datetime);index"`
|
||||
WaybillFinishedAt time.Time `orm:"type(datetime);null;default(null)"`
|
||||
WaybillFinishedAt time.Time `orm:"type(datetime)"`
|
||||
ModelTimeInfo
|
||||
}
|
||||
|
||||
@@ -92,19 +103,19 @@ func (w *Waybill) TableIndex() [][]string {
|
||||
|
||||
// 包含定单与运单的状态及事件vendor status
|
||||
type OrderStatus struct {
|
||||
ID int64 `orm:"column(id)"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)"`
|
||||
VendorID int `orm:"column(vendor_id)"`
|
||||
OrderType int // 0:定单,1:运单
|
||||
Status int // 如果Status为OrderStatusEvent,表示VendorStatus只是一个事件,不是状态
|
||||
VendorStatus string `orm:"size(16)"`
|
||||
StatusTime time.Time `orm:"type(datetime);index"`
|
||||
Count int `orm:"default(1)"`
|
||||
ID int64 `orm:"column(id)"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)"`
|
||||
VendorID int `orm:"column(vendor_id)"`
|
||||
OrderType int // 0:定单,1:运单
|
||||
Status int // 如果Status为OrderStatusEvent,表示VendorStatus只是一个通知事件,不是状态变化
|
||||
VendorStatus string `orm:"size(16)"`
|
||||
StatusTime time.Time `orm:"type(datetime);index"`
|
||||
DuplicatedCount int // 收到的重复状态转换(或消息)数,一般是由于重发赞成的
|
||||
ModelTimeInfo
|
||||
}
|
||||
|
||||
func (v *OrderStatus) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"VendorOrderID", "Status"},
|
||||
[]string{"VendorOrderID", "VendorStatus", "Status"},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user