import { Module } from "@nestjs/common";
import { ConfigModule } from "@nestjs/config";
import { IntegrationsModule } from "@bff/integrations/integrations.module";
import { OrdersModule } from "@bff/modules/orders/orders.module";
import { CatalogModule } from "@bff/modules/catalog/catalog.module";
import { CatalogCdcSubscriber } from "./catalog-cdc.subscriber";
import { OrderCdcSubscriber } from "./order-cdc.subscriber";

@Module({
  imports: [ConfigModule, IntegrationsModule, OrdersModule, CatalogModule],
  providers: [
    CatalogCdcSubscriber, // CDC for catalog cache invalidation
    OrderCdcSubscriber, // CDC for order cache invalidation
  ],
})
export class SalesforceEventsModule {}
