Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Country ¶
type Country struct { core.BaseModel //ID string `gorm:"column:id;type:text;primaryKey" json:"id"` Iso2 string `gorm:"column:iso_2;type:text;not null;uniqueIndex:IDX_region_country_region_id_iso_2_unique,priority:1" json:"iso_2"` Iso3 string `gorm:"column:iso_3;type:text;not null" json:"iso_3"` NumCode int32 `gorm:"column:num_code;type:integer;not null" json:"num_code"` Name string `gorm:"column:name;type:text;not null" json:"name"` DisplayName string `gorm:"column:display_name;type:text;not null" json:"display_name"` RegionId string `gorm:"column:region_id;type:text;uniqueIndex:IDX_region_country_region_id_iso_2_unique,priority:2" json:"region_id"` Region *Region `gorm:"foreignKey:RegionId" json:"region"` }
type Currency ¶
type Currency struct { Code string `gorm:"column:code;type:text;primaryKey" json:"code"` Symbol string `gorm:"column:symbol;type:text;not null" json:"symbol"` SymbolNative string `gorm:"column:symbol_native;type:text;not null" json:"symbol_native"` Name string `gorm:"column:name;type:text;not null" json:"name"` }
type Region ¶
type Region struct { core.BaseModel Name string `gorm:"column:name;type:text;not null" json:"name"` CurrencyCode string `gorm:"column:currency_code;type:text;not null;index:IDX_region_currency_code,priority:1" json:"currency_code"` Currency *Currency `gorm:"foreignKey:CurrencyCode" json:"currency"` Countries []Country `gorm:"foreignKey:RegionId" json:"countries"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:timestamp with time zone;index:IDX_region_deleted_at,priority:1" json:"deleted_at"` }
Click to show internal directories.
Click to hide internal directories.