repository

package
v0.0.0-...-05af6f8 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Customers

type Customers struct {
	// contains filtered or unexported fields
}

func NewCustomers

func NewCustomers(conn *connection.DBConn) *Customers

func (*Customers) CreateCustomerTransaction

func (c *Customers) CreateCustomerTransaction(
	ctx context.Context,
	customerId int,
	value int,
	transactionType models.TransactionType,
	description string,
) (int, int, error)

func (*Customers) GetCustomerStatement

func (c *Customers) GetCustomerStatement(ctx context.Context, id int) (*models.Customer, []*models.Transaction, error)

type GetCustomerStatementResult

type GetCustomerStatementResult struct {
	// customer data
	CustomerId        int
	CustomerLimit     int
	CustomerBalance   int
	CustomerCreatedAt time.Time
	// transaction data
	TransactionId          *int
	TransactionValue       *int
	TransactionType        *models.TransactionType
	TransactionDescription *string
	TransactionCustomerId  *int
	TransactionCreatedAt   *time.Time
}

Jump to

Keyboard shortcuts

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