Files
formularios_api/src/opcion/opcion.module.ts
T

19 lines
902 B
TypeScript
Raw Normal View History

2025-04-02 12:19:47 -06:00
import { Module, forwardRef } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
2025-03-26 14:39:56 -06:00
import { OpcionService } from './opcion.service';
import { OpcionController } from './opcion.controller';
2025-04-01 19:10:59 -06:00
import { Opcion } from './entities/opcion.entity';
2025-04-02 12:19:47 -06:00
import { PreguntaOpcion } from '../pregunta_opcion/entities/pregunta_opcion.entity';
import { PreguntaModule } from '../pregunta/pregunta.module';
import { Pregunta } from '../pregunta/entities/pregunta.entity';
2025-03-26 14:39:56 -06:00
@Module({
2025-04-01 19:10:59 -06:00
imports: [
2025-04-02 12:19:47 -06:00
TypeOrmModule.forFeature([Opcion, Pregunta, PreguntaOpcion]), // Importar todas las entidades necesarias
forwardRef(() => PreguntaModule), // Usar forwardRef para dependencia circular
2025-04-01 19:10:59 -06:00
],
2025-03-26 14:39:56 -06:00
controllers: [OpcionController],
providers: [OpcionService],
2025-04-02 12:19:47 -06:00
exports: [OpcionService, TypeOrmModule], // Exportar TypeOrmModule si otros módulos necesitan los repositorios
2025-03-26 14:39:56 -06:00
})
2025-04-02 12:19:47 -06:00
export class OpcionModule {}