model

package
v0.0.0-...-d2da372 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Conn database.Executor
}

func (*Client) FindByID

func (c *Client) FindByID(id string) (client *domain.Client, err error)

func (*Client) Save

func (c *Client) Save(client *domain.Client) error

type ClientModel

type ClientModel struct {
	ID      int `db:"id"`
	Limit   int `db:"limit"`
	Balance int `db:"balance"`
}

type Transaction

type Transaction struct {
	Conn database.Executor
}

func (*Transaction) GetTransactionsByClientID

func (t *Transaction) GetTransactionsByClientID(clientID string) (transactions []*domain.Transaction, err error)

func (*Transaction) Save

func (t *Transaction) Save(tx *domain.Transaction) error

type TransactionModel

type TransactionModel struct {
	ClientID        int    `db:"client_id"`
	Value           int    `db:"value"`
	TransactionType string `db:"type"`
	Description     string `db:"description"`
	Timestamp       string `db:"timestamp"`
}

Jump to

Keyboard shortcuts

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