145 lines
6.8 KiB
Go
145 lines
6.8 KiB
Go
package model
|
||
|
||
import (
|
||
"math"
|
||
"time"
|
||
)
|
||
|
||
const (
|
||
DefPageSize = 50
|
||
UnlimitedPageSize = math.MaxInt32
|
||
)
|
||
|
||
type ShortSkuInfo struct {
|
||
SkuID int `orm:"column(sku_id)" json:"skuID,omitempty"`
|
||
SkuShopPrice int `json:"skuShopPrice"`
|
||
SkuSalePrice int `json:"skuSalePrice"`
|
||
SkuEarningPrice int `json:"skuEarningPrice,omitempty"`
|
||
SkuCount2 int `json:"skuCount2"`
|
||
SkuName string `orm:"size(255)" json:"skuName"`
|
||
}
|
||
|
||
type GoodsOrderExt struct {
|
||
GoodsOrder
|
||
EarningPrice int64 `json:"earningPrice"` // 预估结算给门店老板的钱
|
||
|
||
WaybillStatus int `json:"waybillStatus"`
|
||
CourierName string `orm:"size(32)" json:"courierName"`
|
||
CourierMobile string `orm:"size(32)" json:"courierMobile"`
|
||
CurrentConsigneeMobile string `orm:"-" json:"currentConsigneeMobile"`
|
||
CourierVendorName string `json:"courierVendorName"`
|
||
|
||
Status2 string `json:"status2"`
|
||
ActualFee int64 `json:"actualFee"` // 实际要支付给快递公司的费用
|
||
DesiredFee int64 `json:"desiredFee"` // 运单总费用
|
||
PunctualFee int64 `json:"punctualFee"` // 订单保险费
|
||
WaybillCreatedAt time.Time `orm:"type(datetime);index" json:"waybillCreatedAt"`
|
||
WaybillFinishedAt time.Time `orm:"type(datetime)" json:"waybillFinishedAt"`
|
||
VendorWaybillId2Waybill string `orm:"column(vendor_waybill_id2);size(48)" json:"vendorWaybillId2Waybill"` // 某些平台有多个ID,比如美团配送,当前美团配送的 delivery_id存这里
|
||
|
||
DistrictName string `json:"districtName"`
|
||
CityName string `json:"cityName"`
|
||
PayPercentage int `json:"payPercentage"`
|
||
VendorPayPercentage int `json:"vendorPayPercentage"`
|
||
OldPayPercentage int `json:"oldPayPercentage"`
|
||
|
||
SkuInfo string `json:"skuInfo,omitempty"`
|
||
SkuInfo2 string `json:"skuInfo2,omitempty"`
|
||
ShortSkuInfo `json:"-"`
|
||
SkuList []*ShortSkuInfo `json:"skuList,omitempty"`
|
||
Count int `json:"count"`
|
||
ShopSumPrice int64 `json:"shopSumPrice"`
|
||
AvgPrice int64 `json:"avgPrice"`
|
||
BadCommentCount int `json:"badCommentCount"`
|
||
JxIncome int64 `json:"jxIncome"` //预计收益
|
||
StoreDayOrderCount int `json:"storeDayOrderCount"` //门店当天单量
|
||
BrandID int `orm:"column(brand_id)" json:"brandID"`
|
||
|
||
FloatLng float64 `json:"floatLng"`
|
||
FloatLat float64 `json:"floatLat"`
|
||
|
||
MarketManPhone string `json:"marketManPhone"` //市場負責人電話
|
||
MarketManName string `json:"marketManName"`
|
||
Comment string `json:"comment"` // 门店备注
|
||
OperatorPhone string `orm:"size(16)" json:"operatorPhone"` // 京东运营人电话
|
||
OperatorName string `orm:"size(32)" json:"operatorName"` // 京东运营人组(角色)
|
||
|
||
OperatorPhone2 string `orm:"size(16)" json:"operatorPhone2"` // 美团运营人电话
|
||
OperatorName2 string `orm:"size(32)" json:"operatorName2"` // 美团运营人组(角色)
|
||
|
||
OperatorPhone3 string `orm:"size(16)" json:"operatorPhone3"` // 饿百运营人电话
|
||
OperatorName3 string `orm:"size(32)" json:"operatorName3"` // 饿百运营人组(角色)
|
||
|
||
VendorPayType string `json:"vendorPayType"` // 支付方式,当订单来源小程序时通过支付方式区分订单来源(w06微信/tt抖音/ks快手/支付宝)
|
||
LiquidatedDamages int64 `json:"liquidated_damages"` // 违约金
|
||
}
|
||
|
||
type OrderSkuExt struct {
|
||
OrderSku
|
||
NameID int `orm:"column(name_id)" json:"nameID"`
|
||
FullSkuName string `json:"fullSkuName"`
|
||
Image string `json:"image"`
|
||
Img2 string `orm:"size(512)" json:"image2"` // 第二张图片
|
||
Img3 string `orm:"size(512)" json:"image3"` //第三张图片
|
||
Img4 string `orm:"size(512)" json:"image4"` //第三张图片
|
||
Img5 string `orm:"size(512)" json:"image5"` //第三张图片
|
||
DescImg string `orm:"size(255)" json:"descImg"` // 商品详情图片描述
|
||
Upc string `json:"upc"` //
|
||
Price int64 `json:"price"` // 商品库价格
|
||
LocationCode2 string `orm:"column(locationCode2)" json:"locationCode2"` // 本地商品货架码
|
||
LocationCode string `orm:"column(locationCode)" json:"location_code"` // 本地商品货架码
|
||
SkuStock int64 `orm:"column(skuStock)" json:"skuStock"` // 商品库存
|
||
|
||
// RealEarningPrice int64 `json:"realEarningPrice"` // 实际单品结算给门店老板钱
|
||
}
|
||
|
||
type GoodsOrderCountInfo struct {
|
||
LockStatus int `json:"lockStatus"`
|
||
Status int `json:"status"`
|
||
Count int `json:"count"`
|
||
}
|
||
|
||
type SkuMetaInfo struct {
|
||
Units []string `json:"units"`
|
||
SpecUnits []string `json:"specUnits"`
|
||
}
|
||
|
||
type PagedInfo struct {
|
||
TotalCount int `json:"totalCount"`
|
||
Data interface{} `json:"data"`
|
||
}
|
||
|
||
type OrderFinancialExt struct {
|
||
OrderFinancial
|
||
VendorStoreID string `orm:"column(vendor_store_id);size(48)" json:"vendorStoreID"` //
|
||
OrderFinishedAt time.Time `orm:"type(datetime)" json:"orderFinishedAt"` // 订单妥投/完成时间
|
||
StoreID int `orm:"column(store_id)" json:"storeID"` // 外部系统里记录的 jxstoreid
|
||
JxStoreID int `orm:"column(jx_store_id)" json:"jxStoreID"` // 根据VendorStoreID在本地系统里查询出来的 jxstoreid
|
||
StoreName string `orm:"size(64)" json:"storeName"` //
|
||
Status int `json:"status"` // 参见OrderStatus*相关的常量定义
|
||
Skus []*OrderSkuFinancial `orm:"-" json:"skus"` // 正向订单购买商品列表
|
||
Discounts []*OrderDiscountFinancial `orm:"-" json:"discounts"` // 正向订单享受优惠列表
|
||
}
|
||
|
||
type OrderFinancialSkuExt struct {
|
||
OrderSkuFinancial
|
||
Image string `json:"image"`
|
||
}
|
||
|
||
type ProductInfo struct {
|
||
OriginalName string `json:"originalName"`
|
||
OriginalSpec string `json:"originalSpec"`
|
||
Name string `json:"name"`
|
||
Img string `json:"img"`
|
||
ImgList []string `json:"imgList"`
|
||
SpecQuality int `json:"specQuality"`
|
||
SpecUnit string `json:"specUnit"`
|
||
Unit string `json:"unit"`
|
||
Weight float32 `json:"weight"`
|
||
Price int `json:"price"`
|
||
Categories []string `json:"categories"`
|
||
ManName string `json:"manName"` // 生产商
|
||
BrandName string `json:"brandName"`
|
||
UpcCode string `json:"upcCode"`
|
||
}
|