refactor: reorganize modules and add Linux build tooling
This commit is contained in:
30
module/base/initial/internal/models/initial_country.go
Normal file
30
module/base/initial/internal/models/initial_country.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package models
|
||||
|
||||
import "git.apinb.com/bsm-sdk/core/database"
|
||||
|
||||
// 国家表
|
||||
type InitialCountry struct {
|
||||
Id uint `gorm:"column:id;" json:"id"` //
|
||||
Iso2 string `gorm:"type:varchar(255);uniqueIndex" json:"iso2"` // ISO 3166-1 alpha-2
|
||||
Iso3 string `gorm:"type:varchar(255);uniqueIndex" json:"iso3"` // ISO 3166-1 alpha-3
|
||||
NumCode string `gorm:"type:varchar(255)" json:"num_code"` // ISO 3166-1 numeric
|
||||
PhoneCode string `gorm:"type:varchar(255)" json:"phone_code"` // 国际电话区号
|
||||
Currency string `gorm:"type:varchar(24);not null" json:"currency"` // 货币简称
|
||||
CurrencySymbol string `gorm:"type:varchar(24);not null" json:"currency_symbol"` // 货币符号
|
||||
Region string `gorm:"type:varchar(24);not null" json:"region"` // 所属地区
|
||||
Name string `gorm:"type:varchar(255);not null" json:"name"` // 英文名称
|
||||
LocalName string `gorm:"type:varchar(255);not null" json:"local_name"` // 本地语言名称
|
||||
Timezones string // 时区配置
|
||||
Translations string // 翻译
|
||||
Enabled bool `gorm:"default:true" json:"enabled"` // 是否启用
|
||||
SortOrder int32 `gorm:"default:0" json:"sort_order"` // 排序
|
||||
}
|
||||
|
||||
func init() {
|
||||
database.AppendMigrate(&InitialCountry{})
|
||||
}
|
||||
|
||||
// TableName .
|
||||
func (table *InitialCountry) TableName() string {
|
||||
return "initial_country" //对应数据库表名
|
||||
}
|
||||
Reference in New Issue
Block a user