feat(ADM-018): completed feature
This commit is contained in:
19
project/src/modules/promotions/index.ts
Normal file
19
project/src/modules/promotions/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/** Public API of the promotions module. */
|
||||
import type pg from 'pg';
|
||||
import { PromotionServiceImpl } from './application/promotion-service.js';
|
||||
import type { PromotionService, PromotionRepository } from './domain/ports.js';
|
||||
import { PgPromotionRepository } from './infrastructure/pg-promotion-repository.js';
|
||||
|
||||
export { registerPromotionsRoutes, type PromotionsRoutesDeps } from './api/promotions.routes.js';
|
||||
export type { PromotionService as PromotionServicePort } from './domain/ports.js';
|
||||
export type { PromotionRepository } from './domain/ports.js';
|
||||
export type {
|
||||
NewPromotion,
|
||||
Promotion,
|
||||
PromotionDiscount,
|
||||
PromotionType,
|
||||
} from './domain/promotion.js';
|
||||
|
||||
export function createPromotionService(pool: pg.Pool): PromotionService {
|
||||
return new PromotionServiceImpl(new PgPromotionRepository(pool));
|
||||
}
|
||||
Reference in New Issue
Block a user