Discover Packages
github.com/k3a/in2tracker
backend
model
package
Version:
v0.0.0-...-2db7ed4
Opens a new window with list of versions in this module.
Published: Aug 17, 2018
License: GPL-3.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package model holds all models, mostly representing database structure.
Please note that time.Time values are always stored in UTC in the database.
That means `meddler:"localtime"` should be used for all time.Time struct fields.
Address holds complete address
type Country struct {
ID int64 `meddler:"id,pk"`
Name string `meddler:"name"`
}
type Currency struct {
ID int64 `meddler:"id,pk"`
Code string `meddler:"code"`
Name string `meddler:"name"`
}
type CurrencyPair struct {
Date time .Time `meddler:"date,localtime"`
SrcCurrencyID int64 `meddler:"src_currency_id"`
DstCurrencyID int64 `meddler:"dst_currency_id"`
Multiplier float64 `meddler:"multiplier"`
}
type Item struct {
ID int64 `meddler:"id,pk"`
MarketID int64 `meddler:"market_id"`
CountryID int64 `meddler:"country_id"`
CurrencyID int64 `meddler:"currency_id"`
Code string `meddler:"code"`
Name string `meddler:"name"`
Address string `meddler:"address"`
}
Item hold item or country info
type Market struct {
ID int64 `meddler:"id,pk"`
Name string `meddler:"name"`
DefaultCurrencyID int64 `meddler:"default_currency_id"`
DefaultCountryID int64 `meddler:"default_country_id"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.