model

package
v0.0.0-...-d047bce Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 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 Transaction

type Transaction struct {
	ID         string    `gorm:"primaryKey"`
	CreatedAt  time.Time `json:"-"`
	UpdatedAt  time.Time `json:"-"`
	UserID     string    `json:"userID"`
	AssetType  string    `json:"assetType"`
	AssetID    string    `json:"assetID"`
	Quantity   float64   `json:"quantity"`
	Price      float64   `json:"price"`
	ExecutedAt time.Time `json:"executedAt"`
}

func NewTx

func NewTx(userID string, assetType string, assetID string, quantity float64, price float64, executedAt int64) Transaction

func (Transaction) Day

func (t Transaction) Day() time.Time

Day returns the day of the execution (time: 00:00:00).

Jump to

Keyboard shortcuts

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