添加用户配送地址管理API
This commit is contained in:
@@ -112,17 +112,42 @@ type UserDeliveryAddress struct {
|
||||
ModelIDCULD
|
||||
|
||||
UserID string `orm:"size(48);column(user_id)" json:"userID"` // 内部唯一标识
|
||||
Name string `orm:"size(255)" json:"name"`
|
||||
|
||||
Tag string `orm:"size(32)" json:"tag"`
|
||||
ConsigneeName string `orm:"size(32)" json:"consigneeName"`
|
||||
ConsigneeMobile string `orm:"size(32)" json:"consigneeMobile"`
|
||||
AutoAddress string `orm:"size(255)" json:"autoAddress"` // 这个是通过坐标自动获取的结构化的地址
|
||||
Address string `orm:"size(255)" json:"address"` // 这个是用户手输入的详细地址
|
||||
CityCode int `orm:"default(0);null" json:"cityCode"` // todo ?
|
||||
DistrictCode int `orm:"default(0);null" json:"districtCode"` // todo ?
|
||||
Lng int `json:"-"` // 乘了10的6次方
|
||||
Lat int `json:"-"` // 乘了10的6次方
|
||||
Remark string `orm:"type(text)" json:"-"`
|
||||
IsDefault int8 `json:"isDefault"`
|
||||
Tag string `orm:"size(32)" json:"tag"`
|
||||
ConsigneeName string `orm:"size(32)" json:"consigneeName"`
|
||||
ConsigneeMobile string `orm:"size(32)" json:"consigneeMobile"`
|
||||
Address string `orm:"size(255)" json:"address"` // 这个是用户手输入的详细地址
|
||||
Lng float64 `orm:"digits(10);decimals(6)" json:"lng"` // 乘了10的6次方
|
||||
Lat float64 `orm:"digits(10);decimals(6)" json:"lat"` // 乘了10的6次方
|
||||
|
||||
AutoAddress string `orm:"size(255)" json:"autoAddress"` // 这个是通过坐标自动获取的结构化的地址
|
||||
CityCode int `orm:"default(0);null" json:"cityCode"` // 根据坐标获得
|
||||
DistrictCode int `orm:"default(0);null" json:"districtCode"` // 根据坐标获得
|
||||
|
||||
Remark string `orm:"type(text)" json:"remark"`
|
||||
IsDefault int8 `json:"isDefault"`
|
||||
}
|
||||
|
||||
func (*UserDeliveryAddress) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
// []string{"UserID", "ConsigneeMobile", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
type UserCartItem struct {
|
||||
ModelIDCUL
|
||||
|
||||
UserID string `orm:"size(48);column(user_id)" json:"userID"`
|
||||
StoreID int `orm:"column(store_id)" json:"storeID"`
|
||||
SkuID int `orm:"column(sku_id)"`
|
||||
ActID int `orm:"column(act_id)" json:"actID"`
|
||||
|
||||
Count int `json:"count"`
|
||||
AddedAt time.Time `orm:"auto_now_add;type(datetime)" json:"addedAt"`
|
||||
}
|
||||
|
||||
func (*UserCartItem) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"UserID", "StoreID", "SkuID", "ActID"},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user