- Store and StoreMap add DeletedAt.
This commit is contained in:
@@ -112,9 +112,9 @@ func init() {
|
||||
}
|
||||
|
||||
type Store struct {
|
||||
ModelIDCUL
|
||||
ModelIDCULD
|
||||
|
||||
Name string `orm:"size(255);unique" json:"name"`
|
||||
Name string `orm:"size(255)" json:"name"`
|
||||
CityCode int `orm:"default(0);null" json:"cityCode"` // todo ?
|
||||
DistrictCode int `orm:"default(0);null" json:"districtCode"` // todo ?
|
||||
Address string `orm:"size(255)" json:"address"`
|
||||
@@ -133,8 +133,14 @@ type Store struct {
|
||||
DeliveryType int8 `orm:"-" json:"-"`
|
||||
}
|
||||
|
||||
func (*Store) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"Name", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
type StoreSub struct {
|
||||
ModelIDCUL
|
||||
ModelIDCULD
|
||||
|
||||
StoreID int `orm:"column(store_id)"`
|
||||
Index int // 子店序号,为0表示主店
|
||||
@@ -148,12 +154,12 @@ type StoreSub struct {
|
||||
|
||||
func (*StoreSub) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"StoreID", "Index"},
|
||||
[]string{"StoreID", "Index", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
type StoreMap struct {
|
||||
ModelIDCUL
|
||||
ModelIDCULD
|
||||
|
||||
StoreID int `orm:"column(store_id)" json:"storeID"`
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
@@ -170,13 +176,13 @@ type StoreMap struct {
|
||||
|
||||
func (*StoreMap) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"StoreID", "VendorID"},
|
||||
[]string{"VendorStoreID", "VendorID"},
|
||||
[]string{"StoreID", "VendorID", "DeletedAt"},
|
||||
[]string{"VendorStoreID", "VendorID", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
type StoreCourierMap struct {
|
||||
ModelIDCUL
|
||||
ModelIDCULD
|
||||
|
||||
StoreID int `orm:"column(store_id)"`
|
||||
VendorID int `orm:"column(vendor_id)"`
|
||||
@@ -186,7 +192,7 @@ type StoreCourierMap struct {
|
||||
|
||||
func (*StoreCourierMap) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"StoreID", "VendorID"},
|
||||
[]string{"VendorStoreID", "VendorID"},
|
||||
[]string{"StoreID", "VendorID", "DeletedAt"},
|
||||
[]string{"VendorStoreID", "VendorID", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user