- jd basic api(category, sku, store management) finished.
This commit is contained in:
@@ -11,19 +11,29 @@ const (
|
||||
MainSubStoreAddress = "本店"
|
||||
)
|
||||
|
||||
// 配送范围类型,此定义与京东到家相同,除非特殊说明,本系统中的坐标都是火星坐标
|
||||
const (
|
||||
DeliveryRangeTypePolygon = 2
|
||||
DeliveryRangeTypeRadius = 3
|
||||
)
|
||||
|
||||
type Store struct {
|
||||
ModelIDCUO
|
||||
Name string `gorm:"type:varchar(255);unique_index"`
|
||||
CityCode int
|
||||
DistrictCode int
|
||||
Address string `gorm:"type:varchar(255)"`
|
||||
OpenTime1 int // 930就表示9点半,用两个的原因是为了支持中午休息,1与2的时间段不能交叉,为0表示没有
|
||||
CloseTime1 int // 格式同上
|
||||
OpenTime2 int // 格式同上
|
||||
CloseTime2 int // 格式同上
|
||||
Lng int // 乘了10的6次方
|
||||
Lat int // 乘了10的6次方
|
||||
Status int
|
||||
Name string `gorm:"type:varchar(255);unique_index"`
|
||||
CityCode int // todo ?
|
||||
DistrictCode int // todo ?
|
||||
Address string `gorm:"type:varchar(255)"`
|
||||
Tel1 string `gorm:"type:varchar(32)"`
|
||||
Tel2 string `gorm:"type:varchar(32)"`
|
||||
OpenTime1 int16 // 930就表示9点半,用两个的原因是为了支持中午休息,1与2的时间段不能交叉,为0表示没有
|
||||
CloseTime1 int16 // 格式同上
|
||||
OpenTime2 int16 // 格式同上
|
||||
CloseTime2 int16 // 格式同上
|
||||
Lng int // 乘了10的6次方
|
||||
Lat int // 乘了10的6次方
|
||||
DeliveryRangeType int8 // 参见相关常量定义
|
||||
DeliveryRange string `gorm:"type:varchar(2048)"` // 如果DeliveryRangeType为DeliveryRangeTypePolygon,则为逗号分隔坐标,分号分隔的坐标点(坐标与Lng和Lat一样,都是整数),比如 121361504,31189308;121420555,31150238。否则为半径,单位为米
|
||||
Status int
|
||||
}
|
||||
|
||||
type StoreSub struct {
|
||||
@@ -32,7 +42,7 @@ type StoreSub struct {
|
||||
Index int `gorm:"unique_index:unique_index1"` // 子店序号,为0表示主店
|
||||
Name string `gorm:"type:varchar(255)"`
|
||||
Address string `gorm:"type:varchar(255)"`
|
||||
Status int
|
||||
Status int // 取值同Store.Status
|
||||
Mobile1 string `gorm:"type:varchar(32)"`
|
||||
Mobile2 string `gorm:"type:varchar(32)"`
|
||||
Mobile3 string `gorm:"type:varchar(32)"`
|
||||
@@ -43,7 +53,7 @@ type StoreMap struct {
|
||||
StoreID int `gorm:"unique_index:storemap1"`
|
||||
VendorID int `gorm:"unique_index:storemap1"`
|
||||
VendorStoreID string `gorm:"type:varchar(48);unique_index"`
|
||||
Status int
|
||||
Status int // 取值同Store.Status
|
||||
|
||||
AutoPickup int8 // 是否自动拣货
|
||||
DeliveryType int8 // 配送类型
|
||||
|
||||
Reference in New Issue
Block a user