model

package
v0.0.0-...-2db7ed4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2018 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Address string
	City    string
	State   string
	Zip     string
	Country string
}

Address holds complete address

func (*Address) String

func (a *Address) String() string

type Country

type Country struct {
	ID   int64  `meddler:"id,pk"`
	Name string `meddler:"name"`
}

type Currency

type Currency struct {
	ID   int64  `meddler:"id,pk"`
	Code string `meddler:"code"`
	Name string `meddler:"name"`
}

type CurrencyPair

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

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

type Market struct {
	ID                int64  `meddler:"id,pk"`
	Name              string `meddler:"name"`
	DefaultCurrencyID int64  `meddler:"default_currency_id"`
	DefaultCountryID  int64  `meddler:"default_country_id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL