You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package address
func ( Address ) TableName ( ) string {
return "address"
}
func ( Area ) TableName ( ) string {
return "area"
}
// Address 表示用户的地址信息
type Address struct {
ID int64 ` json:"id" ` // 地址的唯一标识符
IsDefault string ` json:"is_default" ` // 是否为默认地址( 1表示是, 0表示否)
UserID int64 ` json:"user_id" ` // 关联用户的ID
Consignee string ` json:"consignee" ` // 收货人姓名
Phone string ` json:"phone" ` // 联系电话
ProvinceName string ` json:"province_name" ` // 省份名称
CityName string ` json:"city_name" ` // 城市名称
AreaName string ` json:"area_name" ` // 区域名称
Address string ` json:"address" ` // 详细地址
ProvinceID int64 ` json:"province_id" ` // 省份ID
CityID int64 ` json:"city_id" ` // 城市ID
AreaID int64 ` json:"area_id" ` // 区域ID
Latitude float64 ` json:"latitude" ` // 纬度
Longitude float64 ` json:"longitude" ` // 经度
}
// Area 表示地区信息
type Area struct {
Value int64 ` json:"value" ` // 地区值
Label string ` json:"label" ` // 地区标签
PID int64 ` json:"pid" ` // 上级地区的值
Level int64 ` json:"level" ` // 地区级别
}