From f0b4458b35e765a1ddcaa90dd7092003d172f76c Mon Sep 17 00:00:00 2001 From: gazebo Date: Sat, 12 Oct 2019 13:40:27 +0800 Subject: [PATCH] UserDeliveryAddress --- business/model/user.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/business/model/user.go b/business/model/user.go index fe65d11e1..583264a79 100644 --- a/business/model/user.go +++ b/business/model/user.go @@ -107,3 +107,22 @@ type UserPayment struct { UserID string `orm:"size(48);column(user_id)" json:"userID"` // 内部唯一标识 Type int8 // } + +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"` +}