import { Injectable, OnModuleInit } from '@nestjs/common';
import { ModuleRegistryService } from '../core/services/module-registry.service';

@Injectable()
export class TodoModuleRegistration implements OnModuleInit {
  constructor(private readonly moduleRegistry: ModuleRegistryService) {}

  onModuleInit() {
    this.moduleRegistry.registerModule({
      key: 'todo',
      name: 'To-do',
      description: 'Lista de pendientes para la organización del matrimonio.',
      routePrefix: '/todo',
    });
  }
}
