- continue refactoring...
This commit is contained in:
24
business/model/place.go
Normal file
24
business/model/place.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// https://github.com/videni/pcr
|
||||
const (
|
||||
CityLevelProvince = 1
|
||||
CityLevelCity = 2
|
||||
CityLevelDistrict = 3
|
||||
)
|
||||
|
||||
type Place struct {
|
||||
ID uint
|
||||
Code int `gorm:"unique_index"` // 国家标准代码
|
||||
Name string `gorm:"type:varchar(16);index"` // 如果是直辖市,省的概念不加“市”来区别
|
||||
ParentCode int // 上级代码
|
||||
PostCode string `gorm:"type:varchar(8);index"`
|
||||
Level int8 // 城市级别,参见相关常量定义
|
||||
TelCode string `gorm:"type:varchar(8);index"`
|
||||
JdCode int `gorm:"index"` // 对应的京东代码
|
||||
Enabled int8 // 是否启用
|
||||
MtpsPrice int // 分为单位
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
Reference in New Issue
Block a user