Feat[BE-222.223.224]: creating create one delivery order and getone delivery order[Unfinished]

This commit is contained in:
aguhh18
2025-11-13 09:50:34 +07:00
parent 0a0c3f869b
commit 74ec25db5b
8 changed files with 119 additions and 79 deletions
@@ -11,6 +11,7 @@ import (
type MarketingProductRepository interface {
repository.BaseRepository[entity.MarketingProduct]
GetByMarketingID(ctx context.Context, marketingID uint) ([]entity.MarketingProduct, error)
IdExists(ctx context.Context, id uint) (bool, error)
}
type MarketingProductRepositoryImpl struct {
@@ -33,3 +34,7 @@ func (r *MarketingProductRepositoryImpl) GetByMarketingID(ctx context.Context, m
}
return products, nil
}
func (r *MarketingProductRepositoryImpl) IdExists(ctx context.Context, id uint) (bool, error) {
return repository.Exists[entity.MarketingProduct](ctx, r.DB(), id)
}