Documentation ¶
Index ¶
- type Repository
- func (r *Repository) DeleteFromReservation(ctx context.Context, productID int) error
- func (r *Repository) GetAvailablePharmacyProducts(ctx context.Context, pharmacyID int) ([]entities.PharmacyProductItem, error)
- func (r *Repository) GetProductToReserve(ctx context.Context, productName string, position string) (entities.ProductItem, error)
- func (r *Repository) GetPurchaseProducts(ctx context.Context, pharmacyID int, purchaseUUID string) ([]entities.PurchaseProductItem, error)
- func (r *Repository) GetReservedProduct(ctx context.Context, productName string, position string, uuid string) (entities.ProductItem, error)
- func (r *Repository) Reserve(ctx context.Context, productID int, purchaseUUID string) error
- func (r *Repository) SetProductItemsSold(ctx context.Context, receiptID int, purchaseUUID string) error
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) SetProductItemsSold ¶
Click to show internal directories.
Click to hide internal directories.