model

package
v0.0.0-...-a65e8f8 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coin

type Coin struct {
	Model
	Ticker string `json:"ticker"`
	Status string `json:"status"`
}

Coin Model

type Market

type Market struct {
	Model
	Market     string `json:"market"`
	BaseMarket string `json:"basemarket"`
	Status     string `json:"status"`
}

Market model

type Model

type Model struct {
	ID             uuid.UUID  `json:"id"`
	CreatedAt      time.Time  `json:"created_at"`
	UpdatedAt      time.Time  `json:"updated_at"`
	DeletedAt      *time.Time `json:"deleted_at,omitempty"`
	SkipValidation bool       `gorm:"-" json:"-"`
}

Model type for those models that will be persisted

func (*Model) BeforeCreate

func (m *Model) BeforeCreate() (err error)

BeforeCreate gorm's hook

type Order

type Order struct {
	Model
	Amount   float64   `json:"amount"`
	MarketID uuid.UUID `json:"marketid"`
	Status   string    `json:"status"`
}

Order model

Jump to

Keyboard shortcuts

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