feat(analytics): add valuation handler, AVM service, and market index improvements
Add property valuation query handler with AVM (Automated Valuation Model) service integration. Improve market index, heatmap, and price trend handlers with proper dependency injection and error handling. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -7,10 +7,13 @@ import { GetDistrictStatsHandler } from './application/queries/get-district-stat
|
||||
import { GetHeatmapHandler } from './application/queries/get-heatmap/get-heatmap.handler';
|
||||
import { GetMarketReportHandler } from './application/queries/get-market-report/get-market-report.handler';
|
||||
import { GetPriceTrendHandler } from './application/queries/get-price-trend/get-price-trend.handler';
|
||||
import { GetValuationHandler } from './application/queries/get-valuation/get-valuation.handler';
|
||||
import { MARKET_INDEX_REPOSITORY } from './domain/repositories/market-index.repository';
|
||||
import { VALUATION_REPOSITORY } from './domain/repositories/valuation.repository';
|
||||
import { AVM_SERVICE } from './domain/services/avm-service';
|
||||
import { PrismaMarketIndexRepository } from './infrastructure/repositories/prisma-market-index.repository';
|
||||
import { PrismaValuationRepository } from './infrastructure/repositories/prisma-valuation.repository';
|
||||
import { PrismaAVMService } from './infrastructure/services/prisma-avm.service';
|
||||
import { AnalyticsController } from './presentation/controllers/analytics.controller';
|
||||
|
||||
const CommandHandlers = [
|
||||
@@ -24,6 +27,7 @@ const QueryHandlers = [
|
||||
GetHeatmapHandler,
|
||||
GetPriceTrendHandler,
|
||||
GetDistrictStatsHandler,
|
||||
GetValuationHandler,
|
||||
];
|
||||
|
||||
@Module({
|
||||
@@ -33,11 +37,12 @@ const QueryHandlers = [
|
||||
// Repositories
|
||||
{ provide: MARKET_INDEX_REPOSITORY, useClass: PrismaMarketIndexRepository },
|
||||
{ provide: VALUATION_REPOSITORY, useClass: PrismaValuationRepository },
|
||||
{ provide: AVM_SERVICE, useClass: PrismaAVMService },
|
||||
|
||||
// CQRS
|
||||
...CommandHandlers,
|
||||
...QueryHandlers,
|
||||
],
|
||||
exports: [MARKET_INDEX_REPOSITORY, VALUATION_REPOSITORY],
|
||||
exports: [MARKET_INDEX_REPOSITORY, VALUATION_REPOSITORY, AVM_SERVICE],
|
||||
})
|
||||
export class AnalyticsModule {}
|
||||
|
||||
Reference in New Issue
Block a user