Files
b2b/app/model/countries.go
2026-03-25 02:33:06 +01:00

25 lines
788 B
Go

package model
// Represents a country together with its associated currency
type Country struct {
ID uint `gorm:"primaryKey;column:id" json:"id"`
Name string `gorm:"column:name" json:"name"`
Flag string `gorm:"size:16;not null;column:flag" json:"flag"`
CurrencyID uint `gorm:"column:id_currency" json:"currency_id"`
CurrencyISOCode string `gorm:"column:iso_code" json:"currency_iso_code"`
CurrencyName string `gorm:"column:name" json:"currency_name"`
}
func (Country) TableName() string {
return "b2b_countries"
}
type PSCountry struct {
ID uint `gorm:"primaryKey;column:id_country" json:"id"`
CurrencyID uint `gorm:"column:id_currency" json:"currency_id"`
}
func (PSCountry) TableName() string {
return "ps_country"
}