2026-03-07 18:27:23 +00:00
|
|
|
import type { Sequelize } from "sequelize";
|
|
|
|
|
|
2026-03-30 11:53:39 +00:00
|
|
|
import { CustomerRepository } from "../persistence/sequelize";
|
2026-03-07 18:27:23 +00:00
|
|
|
|
|
|
|
|
import type { ICustomerPersistenceMappers } from "./customer-persistence-mappers.di";
|
|
|
|
|
|
|
|
|
|
export const buildCustomerRepository = (params: {
|
|
|
|
|
database: Sequelize;
|
|
|
|
|
mappers: ICustomerPersistenceMappers;
|
|
|
|
|
}) => {
|
|
|
|
|
const { database, mappers } = params;
|
|
|
|
|
|
2026-03-07 21:39:21 +00:00
|
|
|
return new CustomerRepository(mappers.domainMapper, mappers.summaryMapper, database);
|
2026-03-07 18:27:23 +00:00
|
|
|
};
|