database

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 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 Repository

type Repository interface {
	Migrate() error
	TransactionRepository
	TransactionLogRepository
}

type TransactionLogRepository

type TransactionLogRepository interface {
	CreateTransactionLog(ctx context.Context, h entities.TransactionLog) error
	GetTransactionLogByID(ctx context.Context, id uint) (*entities.TransactionLog, error)
}

type TransactionRepository

type TransactionRepository interface {
	CreateTransaction(ctx context.Context, tr entities.Transaction) error
	GetTransactionByTransactionIDAndType(ctx context.Context, transactionID string, tType entities.TransactionType) (*entities.Transaction, error)
	GetTransactionsByFilter(ctx context.Context, query entities.TransactionQuery) ([]entities.Transaction, error)
	GetAdminTransactionsByFilter(ctx context.Context, query entities.TransactionQuery) ([]entities.Transaction, error)
	GetValidTransactionsForDebitor(ctx context.Context, debitorID int64) ([]entities.Transaction, error)
	QueryOutstandingDuesForDebitor(ctx context.Context, debitorID int64) (int64, error)
	UpdateTransaction(ctx context.Context, tr entities.Transaction, historize bool) error
	DeleteTransaction(ctx context.Context, tr entities.Transaction) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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