model

package
v0.0.0-...-24518c4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	gorm.Model
	Path         string
	Type         string
	SellAmount   string
	BuyAmount    string
	Slippage     float64
	GasLimit     uint64
	GasPriceMult float64
	UserID       uint //foreign key
}

func FromOrder

func FromOrder(o *order.Order) (*Order, error)

Converts an order struct to a database order

func (Order) ToOrder

func (model Order) ToOrder() (*order.Order, error)

Converts a database order to an order struct

type User

type User struct {
	gorm.Model
	TelegramID int64
	Orders     []Order
}

Jump to

Keyboard shortcuts

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