mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 08:22:41 +00:00
basic ad entity without direction
This commit is contained in:
23
src/modules/geography/geography.module.ts
Normal file
23
src/modules/geography/geography.module.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Module, Provider } from '@nestjs/common';
|
||||
import { CqrsModule } from '@nestjs/cqrs';
|
||||
import { DIRECTION_ENCODER, PARAMS_PROVIDER } from './geography.di-tokens';
|
||||
import { DefaultParamsProvider } from './infrastructure/default-params-provider';
|
||||
import { PostgresDirectionEncoder } from './infrastructure/postgres-direction-encoder';
|
||||
|
||||
const adapters: Provider[] = [
|
||||
{
|
||||
provide: PARAMS_PROVIDER,
|
||||
useClass: DefaultParamsProvider,
|
||||
},
|
||||
{
|
||||
provide: DIRECTION_ENCODER,
|
||||
useClass: PostgresDirectionEncoder,
|
||||
},
|
||||
];
|
||||
|
||||
@Module({
|
||||
imports: [CqrsModule],
|
||||
providers: [...adapters],
|
||||
exports: [DIRECTION_ENCODER],
|
||||
})
|
||||
export class GeographyModule {}
|
||||
Reference in New Issue
Block a user