"inicialización"
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { AppController } from './app.controller';
|
||||
import { AppService } from './app.service';
|
||||
|
||||
describe('AppController', () => {
|
||||
let appController: AppController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const app: TestingModule = await Test.createTestingModule({
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
}).compile();
|
||||
|
||||
appController = app.get<AppController>(AppController);
|
||||
});
|
||||
|
||||
describe('root', () => {
|
||||
it('should return "Hello World!"', () => {
|
||||
expect(appController.getHello()).toBe('Hello World!');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { AppService } from './app.service';
|
||||
|
||||
@Controller()
|
||||
export class AppController {
|
||||
constructor(private readonly appService: AppService) {}
|
||||
|
||||
@Get()
|
||||
getHello(): string {
|
||||
return this.appService.getHello();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { AppController } from './app.controller';
|
||||
import { AppService } from './app.service';
|
||||
import { CuestionarioModule } from './cuestionario/cuestionario.module';
|
||||
import { TipoCuestionarioModule } from './tipo_cuestionario/tipo_cuestionario.module';
|
||||
import { CuestionarioSeccionModule } from './cuestionario_seccion/cuestionario_seccion.module';
|
||||
import { SeccionModule } from './seccion/seccion.module';
|
||||
import { SeccionPreguntaModule } from './seccion_pregunta/seccion_pregunta.module';
|
||||
import { PreguntaModule } from './pregunta/pregunta.module';
|
||||
import { TipoPreguntaModule } from './tipo_pregunta/tipo_pregunta.module';
|
||||
import { OpcionModule } from './opcion/opcion.module';
|
||||
import { PreguntaOpcionModule } from './pregunta_opcion/pregunta_opcion.module';
|
||||
|
||||
@Module({
|
||||
imports: [CuestionarioModule, TipoCuestionarioModule, CuestionarioSeccionModule, SeccionModule, SeccionPreguntaModule, PreguntaModule, TipoPreguntaModule, OpcionModule, PreguntaOpcionModule],
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
})
|
||||
export class AppModule {}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class AppService {
|
||||
getHello(): string {
|
||||
return 'Hello World!';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { CuestionarioController } from './cuestionario.controller';
|
||||
import { CuestionarioService } from './cuestionario.service';
|
||||
|
||||
describe('CuestionarioController', () => {
|
||||
let controller: CuestionarioController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [CuestionarioController],
|
||||
providers: [CuestionarioService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<CuestionarioController>(CuestionarioController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { CuestionarioService } from './cuestionario.service';
|
||||
import { CreateCuestionarioDto } from './dto/create-cuestionario.dto';
|
||||
import { UpdateCuestionarioDto } from './dto/update-cuestionario.dto';
|
||||
|
||||
@Controller('cuestionario')
|
||||
export class CuestionarioController {
|
||||
constructor(private readonly cuestionarioService: CuestionarioService) {}
|
||||
|
||||
@Post()
|
||||
create(@Body() createCuestionarioDto: CreateCuestionarioDto) {
|
||||
return this.cuestionarioService.create(createCuestionarioDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.cuestionarioService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.cuestionarioService.findOne(+id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updateCuestionarioDto: UpdateCuestionarioDto) {
|
||||
return this.cuestionarioService.update(+id, updateCuestionarioDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.cuestionarioService.remove(+id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { CuestionarioService } from './cuestionario.service';
|
||||
import { CuestionarioController } from './cuestionario.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [CuestionarioController],
|
||||
providers: [CuestionarioService],
|
||||
})
|
||||
export class CuestionarioModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { CuestionarioService } from './cuestionario.service';
|
||||
|
||||
describe('CuestionarioService', () => {
|
||||
let service: CuestionarioService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [CuestionarioService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<CuestionarioService>(CuestionarioService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CreateCuestionarioDto } from './dto/create-cuestionario.dto';
|
||||
import { UpdateCuestionarioDto } from './dto/update-cuestionario.dto';
|
||||
|
||||
@Injectable()
|
||||
export class CuestionarioService {
|
||||
create(createCuestionarioDto: CreateCuestionarioDto) {
|
||||
return 'This action adds a new cuestionario';
|
||||
}
|
||||
|
||||
findAll() {
|
||||
return `This action returns all cuestionario`;
|
||||
}
|
||||
|
||||
findOne(id: number) {
|
||||
return `This action returns a #${id} cuestionario`;
|
||||
}
|
||||
|
||||
update(id: number, updateCuestionarioDto: UpdateCuestionarioDto) {
|
||||
return `This action updates a #${id} cuestionario`;
|
||||
}
|
||||
|
||||
remove(id: number) {
|
||||
return `This action removes a #${id} cuestionario`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export class CreateCuestionarioDto {}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateCuestionarioDto } from './create-cuestionario.dto';
|
||||
|
||||
export class UpdateCuestionarioDto extends PartialType(CreateCuestionarioDto) {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { CuestionarioSeccionController } from './cuestionario_seccion.controller';
|
||||
import { CuestionarioSeccionService } from './cuestionario_seccion.service';
|
||||
|
||||
describe('CuestionarioSeccionController', () => {
|
||||
let controller: CuestionarioSeccionController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [CuestionarioSeccionController],
|
||||
providers: [CuestionarioSeccionService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<CuestionarioSeccionController>(CuestionarioSeccionController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { CuestionarioSeccionService } from './cuestionario_seccion.service';
|
||||
import { CreateCuestionarioSeccionDto } from './dto/create-cuestionario_seccion.dto';
|
||||
import { UpdateCuestionarioSeccionDto } from './dto/update-cuestionario_seccion.dto';
|
||||
|
||||
@Controller('cuestionario-seccion')
|
||||
export class CuestionarioSeccionController {
|
||||
constructor(private readonly cuestionarioSeccionService: CuestionarioSeccionService) {}
|
||||
|
||||
@Post()
|
||||
create(@Body() createCuestionarioSeccionDto: CreateCuestionarioSeccionDto) {
|
||||
return this.cuestionarioSeccionService.create(createCuestionarioSeccionDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.cuestionarioSeccionService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.cuestionarioSeccionService.findOne(+id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updateCuestionarioSeccionDto: UpdateCuestionarioSeccionDto) {
|
||||
return this.cuestionarioSeccionService.update(+id, updateCuestionarioSeccionDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.cuestionarioSeccionService.remove(+id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { CuestionarioSeccionService } from './cuestionario_seccion.service';
|
||||
import { CuestionarioSeccionController } from './cuestionario_seccion.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [CuestionarioSeccionController],
|
||||
providers: [CuestionarioSeccionService],
|
||||
})
|
||||
export class CuestionarioSeccionModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { CuestionarioSeccionService } from './cuestionario_seccion.service';
|
||||
|
||||
describe('CuestionarioSeccionService', () => {
|
||||
let service: CuestionarioSeccionService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [CuestionarioSeccionService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<CuestionarioSeccionService>(CuestionarioSeccionService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CreateCuestionarioSeccionDto } from './dto/create-cuestionario_seccion.dto';
|
||||
import { UpdateCuestionarioSeccionDto } from './dto/update-cuestionario_seccion.dto';
|
||||
|
||||
@Injectable()
|
||||
export class CuestionarioSeccionService {
|
||||
create(createCuestionarioSeccionDto: CreateCuestionarioSeccionDto) {
|
||||
return 'This action adds a new cuestionarioSeccion';
|
||||
}
|
||||
|
||||
findAll() {
|
||||
return `This action returns all cuestionarioSeccion`;
|
||||
}
|
||||
|
||||
findOne(id: number) {
|
||||
return `This action returns a #${id} cuestionarioSeccion`;
|
||||
}
|
||||
|
||||
update(id: number, updateCuestionarioSeccionDto: UpdateCuestionarioSeccionDto) {
|
||||
return `This action updates a #${id} cuestionarioSeccion`;
|
||||
}
|
||||
|
||||
remove(id: number) {
|
||||
return `This action removes a #${id} cuestionarioSeccion`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export class CreateCuestionarioSeccionDto {}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateCuestionarioSeccionDto } from './create-cuestionario_seccion.dto';
|
||||
|
||||
export class UpdateCuestionarioSeccionDto extends PartialType(CreateCuestionarioSeccionDto) {}
|
||||
@@ -0,0 +1 @@
|
||||
export class CuestionarioSeccion {}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
await app.listen(process.env.PORT ?? 3000);
|
||||
}
|
||||
bootstrap();
|
||||
@@ -0,0 +1 @@
|
||||
export class CreateOpcionDto {}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateOpcionDto } from './create-opcion.dto';
|
||||
|
||||
export class UpdateOpcionDto extends PartialType(CreateOpcionDto) {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { OpcionController } from './opcion.controller';
|
||||
import { OpcionService } from './opcion.service';
|
||||
|
||||
describe('OpcionController', () => {
|
||||
let controller: OpcionController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [OpcionController],
|
||||
providers: [OpcionService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<OpcionController>(OpcionController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { OpcionService } from './opcion.service';
|
||||
import { CreateOpcionDto } from './dto/create-opcion.dto';
|
||||
import { UpdateOpcionDto } from './dto/update-opcion.dto';
|
||||
|
||||
@Controller('opcion')
|
||||
export class OpcionController {
|
||||
constructor(private readonly opcionService: OpcionService) {}
|
||||
|
||||
@Post()
|
||||
create(@Body() createOpcionDto: CreateOpcionDto) {
|
||||
return this.opcionService.create(createOpcionDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.opcionService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.opcionService.findOne(+id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updateOpcionDto: UpdateOpcionDto) {
|
||||
return this.opcionService.update(+id, updateOpcionDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.opcionService.remove(+id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { OpcionService } from './opcion.service';
|
||||
import { OpcionController } from './opcion.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [OpcionController],
|
||||
providers: [OpcionService],
|
||||
})
|
||||
export class OpcionModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { OpcionService } from './opcion.service';
|
||||
|
||||
describe('OpcionService', () => {
|
||||
let service: OpcionService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [OpcionService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<OpcionService>(OpcionService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CreateOpcionDto } from './dto/create-opcion.dto';
|
||||
import { UpdateOpcionDto } from './dto/update-opcion.dto';
|
||||
|
||||
@Injectable()
|
||||
export class OpcionService {
|
||||
create(createOpcionDto: CreateOpcionDto) {
|
||||
return 'This action adds a new opcion';
|
||||
}
|
||||
|
||||
findAll() {
|
||||
return `This action returns all opcion`;
|
||||
}
|
||||
|
||||
findOne(id: number) {
|
||||
return `This action returns a #${id} opcion`;
|
||||
}
|
||||
|
||||
update(id: number, updateOpcionDto: UpdateOpcionDto) {
|
||||
return `This action updates a #${id} opcion`;
|
||||
}
|
||||
|
||||
remove(id: number) {
|
||||
return `This action removes a #${id} opcion`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export class CreatePreguntaDto {}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreatePreguntaDto } from './create-pregunta.dto';
|
||||
|
||||
export class UpdatePreguntaDto extends PartialType(CreatePreguntaDto) {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { PreguntaController } from './pregunta.controller';
|
||||
import { PreguntaService } from './pregunta.service';
|
||||
|
||||
describe('PreguntaController', () => {
|
||||
let controller: PreguntaController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [PreguntaController],
|
||||
providers: [PreguntaService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<PreguntaController>(PreguntaController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { PreguntaService } from './pregunta.service';
|
||||
import { CreatePreguntaDto } from './dto/create-pregunta.dto';
|
||||
import { UpdatePreguntaDto } from './dto/update-pregunta.dto';
|
||||
|
||||
@Controller('pregunta')
|
||||
export class PreguntaController {
|
||||
constructor(private readonly preguntaService: PreguntaService) {}
|
||||
|
||||
@Post()
|
||||
create(@Body() createPreguntaDto: CreatePreguntaDto) {
|
||||
return this.preguntaService.create(createPreguntaDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.preguntaService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.preguntaService.findOne(+id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updatePreguntaDto: UpdatePreguntaDto) {
|
||||
return this.preguntaService.update(+id, updatePreguntaDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.preguntaService.remove(+id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { PreguntaService } from './pregunta.service';
|
||||
import { PreguntaController } from './pregunta.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [PreguntaController],
|
||||
providers: [PreguntaService],
|
||||
})
|
||||
export class PreguntaModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { PreguntaService } from './pregunta.service';
|
||||
|
||||
describe('PreguntaService', () => {
|
||||
let service: PreguntaService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [PreguntaService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<PreguntaService>(PreguntaService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CreatePreguntaDto } from './dto/create-pregunta.dto';
|
||||
import { UpdatePreguntaDto } from './dto/update-pregunta.dto';
|
||||
|
||||
@Injectable()
|
||||
export class PreguntaService {
|
||||
create(createPreguntaDto: CreatePreguntaDto) {
|
||||
return 'This action adds a new pregunta';
|
||||
}
|
||||
|
||||
findAll() {
|
||||
return `This action returns all pregunta`;
|
||||
}
|
||||
|
||||
findOne(id: number) {
|
||||
return `This action returns a #${id} pregunta`;
|
||||
}
|
||||
|
||||
update(id: number, updatePreguntaDto: UpdatePreguntaDto) {
|
||||
return `This action updates a #${id} pregunta`;
|
||||
}
|
||||
|
||||
remove(id: number) {
|
||||
return `This action removes a #${id} pregunta`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export class CreatePreguntaOpcionDto {}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreatePreguntaOpcionDto } from './create-pregunta_opcion.dto';
|
||||
|
||||
export class UpdatePreguntaOpcionDto extends PartialType(CreatePreguntaOpcionDto) {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { PreguntaOpcionController } from './pregunta_opcion.controller';
|
||||
import { PreguntaOpcionService } from './pregunta_opcion.service';
|
||||
|
||||
describe('PreguntaOpcionController', () => {
|
||||
let controller: PreguntaOpcionController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [PreguntaOpcionController],
|
||||
providers: [PreguntaOpcionService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<PreguntaOpcionController>(PreguntaOpcionController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { PreguntaOpcionService } from './pregunta_opcion.service';
|
||||
import { CreatePreguntaOpcionDto } from './dto/create-pregunta_opcion.dto';
|
||||
import { UpdatePreguntaOpcionDto } from './dto/update-pregunta_opcion.dto';
|
||||
|
||||
@Controller('pregunta-opcion')
|
||||
export class PreguntaOpcionController {
|
||||
constructor(private readonly preguntaOpcionService: PreguntaOpcionService) {}
|
||||
|
||||
@Post()
|
||||
create(@Body() createPreguntaOpcionDto: CreatePreguntaOpcionDto) {
|
||||
return this.preguntaOpcionService.create(createPreguntaOpcionDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.preguntaOpcionService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.preguntaOpcionService.findOne(+id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updatePreguntaOpcionDto: UpdatePreguntaOpcionDto) {
|
||||
return this.preguntaOpcionService.update(+id, updatePreguntaOpcionDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.preguntaOpcionService.remove(+id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { PreguntaOpcionService } from './pregunta_opcion.service';
|
||||
import { PreguntaOpcionController } from './pregunta_opcion.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [PreguntaOpcionController],
|
||||
providers: [PreguntaOpcionService],
|
||||
})
|
||||
export class PreguntaOpcionModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { PreguntaOpcionService } from './pregunta_opcion.service';
|
||||
|
||||
describe('PreguntaOpcionService', () => {
|
||||
let service: PreguntaOpcionService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [PreguntaOpcionService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<PreguntaOpcionService>(PreguntaOpcionService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CreatePreguntaOpcionDto } from './dto/create-pregunta_opcion.dto';
|
||||
import { UpdatePreguntaOpcionDto } from './dto/update-pregunta_opcion.dto';
|
||||
|
||||
@Injectable()
|
||||
export class PreguntaOpcionService {
|
||||
create(createPreguntaOpcionDto: CreatePreguntaOpcionDto) {
|
||||
return 'This action adds a new preguntaOpcion';
|
||||
}
|
||||
|
||||
findAll() {
|
||||
return `This action returns all preguntaOpcion`;
|
||||
}
|
||||
|
||||
findOne(id: number) {
|
||||
return `This action returns a #${id} preguntaOpcion`;
|
||||
}
|
||||
|
||||
update(id: number, updatePreguntaOpcionDto: UpdatePreguntaOpcionDto) {
|
||||
return `This action updates a #${id} preguntaOpcion`;
|
||||
}
|
||||
|
||||
remove(id: number) {
|
||||
return `This action removes a #${id} preguntaOpcion`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export class CreateSeccionDto {}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateSeccionDto } from './create-seccion.dto';
|
||||
|
||||
export class UpdateSeccionDto extends PartialType(CreateSeccionDto) {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { SeccionController } from './seccion.controller';
|
||||
import { SeccionService } from './seccion.service';
|
||||
|
||||
describe('SeccionController', () => {
|
||||
let controller: SeccionController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [SeccionController],
|
||||
providers: [SeccionService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<SeccionController>(SeccionController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { SeccionService } from './seccion.service';
|
||||
import { CreateSeccionDto } from './dto/create-seccion.dto';
|
||||
import { UpdateSeccionDto } from './dto/update-seccion.dto';
|
||||
|
||||
@Controller('seccion')
|
||||
export class SeccionController {
|
||||
constructor(private readonly seccionService: SeccionService) {}
|
||||
|
||||
@Post()
|
||||
create(@Body() createSeccionDto: CreateSeccionDto) {
|
||||
return this.seccionService.create(createSeccionDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.seccionService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.seccionService.findOne(+id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updateSeccionDto: UpdateSeccionDto) {
|
||||
return this.seccionService.update(+id, updateSeccionDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.seccionService.remove(+id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { SeccionService } from './seccion.service';
|
||||
import { SeccionController } from './seccion.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [SeccionController],
|
||||
providers: [SeccionService],
|
||||
})
|
||||
export class SeccionModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { SeccionService } from './seccion.service';
|
||||
|
||||
describe('SeccionService', () => {
|
||||
let service: SeccionService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [SeccionService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<SeccionService>(SeccionService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CreateSeccionDto } from './dto/create-seccion.dto';
|
||||
import { UpdateSeccionDto } from './dto/update-seccion.dto';
|
||||
|
||||
@Injectable()
|
||||
export class SeccionService {
|
||||
create(createSeccionDto: CreateSeccionDto) {
|
||||
return 'This action adds a new seccion';
|
||||
}
|
||||
|
||||
findAll() {
|
||||
return `This action returns all seccion`;
|
||||
}
|
||||
|
||||
findOne(id: number) {
|
||||
return `This action returns a #${id} seccion`;
|
||||
}
|
||||
|
||||
update(id: number, updateSeccionDto: UpdateSeccionDto) {
|
||||
return `This action updates a #${id} seccion`;
|
||||
}
|
||||
|
||||
remove(id: number) {
|
||||
return `This action removes a #${id} seccion`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export class CreateSeccionPreguntaDto {}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateSeccionPreguntaDto } from './create-seccion_pregunta.dto';
|
||||
|
||||
export class UpdateSeccionPreguntaDto extends PartialType(CreateSeccionPreguntaDto) {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { SeccionPreguntaController } from './seccion_pregunta.controller';
|
||||
import { SeccionPreguntaService } from './seccion_pregunta.service';
|
||||
|
||||
describe('SeccionPreguntaController', () => {
|
||||
let controller: SeccionPreguntaController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [SeccionPreguntaController],
|
||||
providers: [SeccionPreguntaService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<SeccionPreguntaController>(SeccionPreguntaController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { SeccionPreguntaService } from './seccion_pregunta.service';
|
||||
import { CreateSeccionPreguntaDto } from './dto/create-seccion_pregunta.dto';
|
||||
import { UpdateSeccionPreguntaDto } from './dto/update-seccion_pregunta.dto';
|
||||
|
||||
@Controller('seccion-pregunta')
|
||||
export class SeccionPreguntaController {
|
||||
constructor(private readonly seccionPreguntaService: SeccionPreguntaService) {}
|
||||
|
||||
@Post()
|
||||
create(@Body() createSeccionPreguntaDto: CreateSeccionPreguntaDto) {
|
||||
return this.seccionPreguntaService.create(createSeccionPreguntaDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.seccionPreguntaService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.seccionPreguntaService.findOne(+id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updateSeccionPreguntaDto: UpdateSeccionPreguntaDto) {
|
||||
return this.seccionPreguntaService.update(+id, updateSeccionPreguntaDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.seccionPreguntaService.remove(+id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { SeccionPreguntaService } from './seccion_pregunta.service';
|
||||
import { SeccionPreguntaController } from './seccion_pregunta.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [SeccionPreguntaController],
|
||||
providers: [SeccionPreguntaService],
|
||||
})
|
||||
export class SeccionPreguntaModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { SeccionPreguntaService } from './seccion_pregunta.service';
|
||||
|
||||
describe('SeccionPreguntaService', () => {
|
||||
let service: SeccionPreguntaService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [SeccionPreguntaService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<SeccionPreguntaService>(SeccionPreguntaService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CreateSeccionPreguntaDto } from './dto/create-seccion_pregunta.dto';
|
||||
import { UpdateSeccionPreguntaDto } from './dto/update-seccion_pregunta.dto';
|
||||
|
||||
@Injectable()
|
||||
export class SeccionPreguntaService {
|
||||
create(createSeccionPreguntaDto: CreateSeccionPreguntaDto) {
|
||||
return 'This action adds a new seccionPregunta';
|
||||
}
|
||||
|
||||
findAll() {
|
||||
return `This action returns all seccionPregunta`;
|
||||
}
|
||||
|
||||
findOne(id: number) {
|
||||
return `This action returns a #${id} seccionPregunta`;
|
||||
}
|
||||
|
||||
update(id: number, updateSeccionPreguntaDto: UpdateSeccionPreguntaDto) {
|
||||
return `This action updates a #${id} seccionPregunta`;
|
||||
}
|
||||
|
||||
remove(id: number) {
|
||||
return `This action removes a #${id} seccionPregunta`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export class CreateTipoCuestionarioDto {}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateTipoCuestionarioDto } from './create-tipo_cuestionario.dto';
|
||||
|
||||
export class UpdateTipoCuestionarioDto extends PartialType(CreateTipoCuestionarioDto) {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { TipoCuestionarioController } from './tipo_cuestionario.controller';
|
||||
import { TipoCuestionarioService } from './tipo_cuestionario.service';
|
||||
|
||||
describe('TipoCuestionarioController', () => {
|
||||
let controller: TipoCuestionarioController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [TipoCuestionarioController],
|
||||
providers: [TipoCuestionarioService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<TipoCuestionarioController>(TipoCuestionarioController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { TipoCuestionarioService } from './tipo_cuestionario.service';
|
||||
import { CreateTipoCuestionarioDto } from './dto/create-tipo_cuestionario.dto';
|
||||
import { UpdateTipoCuestionarioDto } from './dto/update-tipo_cuestionario.dto';
|
||||
|
||||
@Controller('tipo-cuestionario')
|
||||
export class TipoCuestionarioController {
|
||||
constructor(private readonly tipoCuestionarioService: TipoCuestionarioService) {}
|
||||
|
||||
@Post()
|
||||
create(@Body() createTipoCuestionarioDto: CreateTipoCuestionarioDto) {
|
||||
return this.tipoCuestionarioService.create(createTipoCuestionarioDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.tipoCuestionarioService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.tipoCuestionarioService.findOne(+id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updateTipoCuestionarioDto: UpdateTipoCuestionarioDto) {
|
||||
return this.tipoCuestionarioService.update(+id, updateTipoCuestionarioDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.tipoCuestionarioService.remove(+id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TipoCuestionarioService } from './tipo_cuestionario.service';
|
||||
import { TipoCuestionarioController } from './tipo_cuestionario.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [TipoCuestionarioController],
|
||||
providers: [TipoCuestionarioService],
|
||||
})
|
||||
export class TipoCuestionarioModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { TipoCuestionarioService } from './tipo_cuestionario.service';
|
||||
|
||||
describe('TipoCuestionarioService', () => {
|
||||
let service: TipoCuestionarioService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [TipoCuestionarioService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<TipoCuestionarioService>(TipoCuestionarioService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CreateTipoCuestionarioDto } from './dto/create-tipo_cuestionario.dto';
|
||||
import { UpdateTipoCuestionarioDto } from './dto/update-tipo_cuestionario.dto';
|
||||
|
||||
@Injectable()
|
||||
export class TipoCuestionarioService {
|
||||
create(createTipoCuestionarioDto: CreateTipoCuestionarioDto) {
|
||||
return 'This action adds a new tipoCuestionario';
|
||||
}
|
||||
|
||||
findAll() {
|
||||
return `This action returns all tipoCuestionario`;
|
||||
}
|
||||
|
||||
findOne(id: number) {
|
||||
return `This action returns a #${id} tipoCuestionario`;
|
||||
}
|
||||
|
||||
update(id: number, updateTipoCuestionarioDto: UpdateTipoCuestionarioDto) {
|
||||
return `This action updates a #${id} tipoCuestionario`;
|
||||
}
|
||||
|
||||
remove(id: number) {
|
||||
return `This action removes a #${id} tipoCuestionario`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export class CreateTipoPreguntaDto {}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateTipoPreguntaDto } from './create-tipo_pregunta.dto';
|
||||
|
||||
export class UpdateTipoPreguntaDto extends PartialType(CreateTipoPreguntaDto) {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { TipoPreguntaController } from './tipo_pregunta.controller';
|
||||
import { TipoPreguntaService } from './tipo_pregunta.service';
|
||||
|
||||
describe('TipoPreguntaController', () => {
|
||||
let controller: TipoPreguntaController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [TipoPreguntaController],
|
||||
providers: [TipoPreguntaService],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<TipoPreguntaController>(TipoPreguntaController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TipoPreguntaService } from './tipo_pregunta.service';
|
||||
import { TipoPreguntaController } from './tipo_pregunta.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [TipoPreguntaController],
|
||||
providers: [TipoPreguntaService],
|
||||
})
|
||||
export class TipoPreguntaModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { TipoPreguntaService } from './tipo_pregunta.service';
|
||||
|
||||
describe('TipoPreguntaService', () => {
|
||||
let service: TipoPreguntaService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [TipoPreguntaService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<TipoPreguntaService>(TipoPreguntaService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user