import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CONNECTION_NAME } from 'src/core/strings/constants/base.constants';
import { {{pascalCase name}}DataService } from './data/services/{{dashCase name}}-data.service';
import { {{pascalCase name}}ReadService } from './data/services/{{dashCase name}}-read.service';
import { {{pascalCase name}}ReadController } from './infrastructure/{{dashCase name}}-read.controller';
import { {{pascalCase name}}ReadOrchestrator } from './domain/usecases/{{dashCase name}}-read.orchestrator';
import { {{pascalCase name}}DataController } from './infrastructure/{{dashCase name}}-data.controller';
import { {{pascalCase name}}DataOrchestrator } from './domain/usecases/{{dashCase name}}-data.orchestrator';
import { Create{{pascalCase name}}Manager } from './domain/usecases/managers/create-{{dashCase name}}.manager';
import { CqrsModule } from '@nestjs/cqrs';
import { Index{{pascalCase name}}Manager } from './domain/usecases/managers/index-{{dashCase name}}.manager';
import { Delete{{pascalCase name}}Manager } from './domain/usecases/managers/delete-{{dashCase name}}.manager';
import { Update{{pascalCase name}}Manager } from './domain/usecases/managers/update-{{dashCase name}}.manager';
import { Detail{{pascalCase name}}Manager } from './domain/usecases/managers/detail-{{dashCase name}}.manager';
import { BatchDelete{{pascalCase name}}Manager } from './domain/usecases/managers/batch-delete-{{dashCase name}}.manager';
import { {{pascalCase name}}Model } from './data/models/{{dashCase name}}.model';

@Module({
  imports: [
    ConfigModule.forRoot(),
    TypeOrmModule.forFeature([{{pascalCase name}}Model], CONNECTION_NAME.DEFAULT),
    CqrsModule,
  ],
  controllers: [
    {{pascalCase name}}DataController,
    {{pascalCase name}}ReadController,
  ],
  providers: [
    Index{{pascalCase name}}Manager,
    Detail{{pascalCase name}}Manager,
    Create{{pascalCase name}}Manager,
    Delete{{pascalCase name}}Manager,
    Update{{pascalCase name}}Manager,
    BatchDelete{{pascalCase name}}Manager,

    {{pascalCase name}}DataService,
    {{pascalCase name}}ReadService,

    {{pascalCase name}}DataOrchestrator,
    {{pascalCase name}}ReadOrchestrator,
  ],
})
export class {{pascalCase name}}Module {}
