import { Module } from '@nestjs/common';
import { MikroOrmModule } from '@mikro-orm/nestjs';
import { CoreModule } from '../core/core.module';
import { TodoService } from './services/todo.service';
import { TodoController } from './api/todo.controller';
import { TodoSubscriber } from './subscribers/todo.subscriber';
import { TodoItemSchema } from './entities/todo.entity';
import { TodoModuleRegistration } from './todo.registration';

@Module({
  imports: [CoreModule, MikroOrmModule.forFeature({ entities: [TodoItemSchema] })],
  providers: [TodoService, TodoSubscriber, TodoModuleRegistration],
  controllers: [TodoController],
  exports: [TodoService],
})
export class TodoModule {}
