- continue refactoring...
This commit is contained in:
59
business/model/store.go
Normal file
59
business/model/store.go
Normal file
@@ -0,0 +1,59 @@
|
||||
package model
|
||||
|
||||
const (
|
||||
StoreStatusDisabled = -1
|
||||
StoreStatusClosed = 0
|
||||
StoreStatusOpened = 1
|
||||
)
|
||||
|
||||
const (
|
||||
MainSubStoreName = "本店"
|
||||
MainSubStoreAddress = "本店"
|
||||
)
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
type StoreSub struct {
|
||||
ModelIDCUO
|
||||
StoreID int `gorm:"unique_index:unique_index1"`
|
||||
Index int `gorm:"unique_index:unique_index1"` // 子店序号,为0表示主店
|
||||
Name string `gorm:"type:varchar(255)"`
|
||||
Address string `gorm:"type:varchar(255)"`
|
||||
Status int
|
||||
Mobile1 string `gorm:"type:varchar(32)"`
|
||||
Mobile2 string `gorm:"type:varchar(32)"`
|
||||
Mobile3 string `gorm:"type:varchar(32)"`
|
||||
}
|
||||
|
||||
type StoreMap struct {
|
||||
ModelIDCUO
|
||||
StoreID int `gorm:"unique_index:storemap1"`
|
||||
VendorID int `gorm:"unique_index:storemap1"`
|
||||
VendorStoreID string `gorm:"type:varchar(48);unique_index"`
|
||||
Status int
|
||||
|
||||
AutoPickup int8 // 是否自动拣货
|
||||
DeliveryType int8 // 配送类型
|
||||
DeliveryCompetition int8 // 是否支持配送竞争
|
||||
}
|
||||
|
||||
type StoreCourierMap struct {
|
||||
ModelIDCUO
|
||||
StoreID int `gorm:"unique_index:storemap1"`
|
||||
VendorID int `gorm:"unique_index:storemap1"`
|
||||
VendorStoreID string `gorm:"type:varchar(48);unique_index"`
|
||||
Status int
|
||||
}
|
||||
Reference in New Issue
Block a user