dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_TasksModule cluster_TasksModule_providers cluster_TasksModule_imports cluster_TasksModule_exports DatabaseModule DatabaseModule TasksModule TasksModule DatabaseModule->TasksModule TasksService TasksService TasksModule->TasksService UserTasksService UserTasksService TasksModule->UserTasksService CreateSomeUserTasksUseCase CreateSomeUserTasksUseCase CreateSomeUserTasksUseCase->TasksModule GetAllTasksUseCase GetAllTasksUseCase GetAllTasksUseCase->TasksModule GetAllUserTasksUseCase GetAllUserTasksUseCase GetAllUserTasksUseCase->TasksModule TasksResolver TasksResolver TasksResolver->TasksModule TasksService TasksService TasksService->TasksModule UpdateSomeUserTasksUseCase UpdateSomeUserTasksUseCase UpdateSomeUserTasksUseCase->TasksModule UserTasksResolver UserTasksResolver UserTasksResolver->TasksModule UserTasksService UserTasksService UserTasksService->TasksModule
import { Module } from '@nestjs/common';
import { DatabaseModule } from '@shared/infrastructure-mongoose';
import {
  TasksService,
  UserTasksService,
  GetAllTasksUseCase,
  GetAllUserTasksUseCase,
  CreateSomeUserTasksUseCase,
  UpdateSomeUserTasksUseCase,
} from '@tasks/application';
import {
  MongooseTasksRepository,
  TaskDocument,
  TaskSchema,
} from '@tasks/infrastructure-mongoose';
import { MongooseModule } from '@nestjs/mongoose';
import { TASKS_REPOSITORY } from '@tasks/domain';

import { TasksResolver } from './resolver/tasks.resolver';
import { UserTasksResolver } from './resolver/user-tasks.resolver';

@Module({
  providers: [
    TasksResolver,
    TasksService,
    UserTasksResolver,
    UserTasksService,
    GetAllTasksUseCase,
    GetAllUserTasksUseCase,
    CreateSomeUserTasksUseCase,
    UpdateSomeUserTasksUseCase,
    {
      provide: TASKS_REPOSITORY,
      useClass: MongooseTasksRepository,
    },
  ],
  imports: [
    DatabaseModule,
    MongooseModule.forFeature([
      { name: TaskDocument.name, schema: TaskSchema },
    ]),
  ],
  exports: [TasksService, UserTasksService],
})
export class TasksModule {}

results matching ""

    No results matching ""