debt

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debt

type Debt struct {
	ID                   string    `db:"id"`
	BorrowerID           string    `db:"borrower_id"`
	LenderID             string    `db:"lender_id"`
	OrderID              string    `db:"order_id"`
	Amount               float64   `db:"amount"`
	InitiatedTransportID string    `db:"initial_transport"`
	MessageID            string    `db:"thread_ts"`
	CreatedAt            time.Time `db:"created_at"`
}

func NewDebt

func NewDebt(borrowerID, lenderID, orderID, initiatedTransportID, messageID string, amount float64) *Debt

type Store

type Store interface {
	AddDebt(debt *Debt) error
	RemoveDebtInOrderID(orderID, debtID string) error
	ListDebtsForOrderID(orderID string) ([]*Debt, error)
}

Jump to

Keyboard shortcuts

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