productrepo

package
v0.0.0-...-e2b2710 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: GPL-3.0 Imports: 5 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 struct {
	// contains filtered or unexported fields
}

func NewProductRepo

func NewProductRepo(master *sqlx.DB, slave *sqlx.DB) *Repository

func (*Repository) DeleteFromReservation

func (r *Repository) DeleteFromReservation(ctx context.Context, productID int) error

func (*Repository) GetAvailablePharmacyProducts

func (r *Repository) GetAvailablePharmacyProducts(
	ctx context.Context,
	pharmacyID int,
) ([]entities.PharmacyProductItem, error)

func (*Repository) GetProductToReserve

func (r *Repository) GetProductToReserve(
	ctx context.Context,
	productName string,
	position string,
) (entities.ProductItem, error)

TODO refactor. Don't like way of working with products.

func (*Repository) GetPurchaseProducts

func (r *Repository) GetPurchaseProducts(
	ctx context.Context,
	pharmacyID int,
	purchaseUUID string,
) ([]entities.PurchaseProductItem, error)

func (*Repository) GetReservedProduct

func (r *Repository) GetReservedProduct(
	ctx context.Context,
	productName string,
	position string,
	uuid string,
) (entities.ProductItem, error)

func (*Repository) Reserve

func (r *Repository) Reserve(ctx context.Context, productID int, purchaseUUID string) error

func (*Repository) SetProductItemsSold

func (r *Repository) SetProductItemsSold(ctx context.Context, receiptID int, purchaseUUID string) error

Jump to

Keyboard shortcuts

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