Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InventoryRepository ¶
type InventoryRepository interface { CreateMerchant(ctx context.Context, merchantName string, adminID uint) (uuid.UUID, error) ListMerchant(ctx context.Context) (merchants []model.Merchant, err error) ListMerchantByIDs(ctx context.Context, mids []uuid.UUID) ([]model.Merchant, error) CreateProduct(ctx context.Context, name, desc string, mid uuid.UUID, qty int, price float32) (uuid.UUID, error) ListProduct(ctx context.Context, qp *dto.BasicQueryParam) ([]model.Product, error) ListProductByIDs(ctx context.Context, pids []uuid.UUID, qp *dto.BasicQueryParam) ([]model.Product, error) ReserveProduct(ctx context.Context, oid, pid uuid.UUID, qty int) (payble float32, err error) RemoveReservedProduct(ctx context.Context, oid uuid.UUID) error UndoReserveProduct(ctx context.Context, oid uuid.UUID) error }
InventoryRepository defines all the DB operations that the service supports
func NewBasicOrderRepo ¶
func NewBasicOrderRepo(db *gorm.DB) InventoryRepository
Click to show internal directories.
Click to hide internal directories.