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.

17 lines
851 B

package model
type District struct { // 国家-地区表
ID uint `gorm:"primaryKey" json:"id"` // 主键ID
CountryId uint `gorm:"type:bigint(20)" json:"countryId"` // 国家id
Adcode string `gorm:"size:20" json:"adcode"` // 地区编码
Name string `gorm:"size:100" json:"name"` // 名称
Abbr string `gorm:"size:50" json:"abbr"` // 简称
Lng float64 `gorm:"type:decimal(10,7)" json:"lng"` // 经度
Lat float64 `gorm:"type:decimal(10,7)" json:"lat"` // 纬度
ParentID uint `json:"parentId"` // 父级id
Status int `gorm:"type:tinyint(1);default:1" json:"status"` // 状态 0:下架 1:上架
}
func (District) TableName() string {
return "district"
}