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.
15 lines
653 B
15 lines
653 B
package model
|
|
|
|
type Country struct { // 国家
|
|
ID uint `gorm:"primaryKey" json:"id"` // 主键ID
|
|
Adcode string `gorm:"unique;size:20" json:"adcode"` // 地区id
|
|
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"` // 纬度
|
|
Status int `gorm:"type:tinyint(1);default:1" json:"status"` // 状态 0:下架 1:上架
|
|
}
|
|
|
|
func (Country) TableName() string {
|
|
return "country"
|
|
}
|
|
|