"inicialización"
This commit is contained in:
+56
@@ -0,0 +1,56 @@
|
||||
# compiled output
|
||||
/dist
|
||||
/node_modules
|
||||
/build
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
pnpm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
|
||||
# Tests
|
||||
/coverage
|
||||
/.nyc_output
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# temp directory
|
||||
.temp
|
||||
.tmp
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
<p align="center">
|
||||
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
|
||||
</p>
|
||||
|
||||
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
|
||||
[circleci-url]: https://circleci.com/gh/nestjs/nest
|
||||
|
||||
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
|
||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
|
||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
|
||||
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
|
||||
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
|
||||
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
|
||||
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
|
||||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
|
||||
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
|
||||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
|
||||
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
|
||||
</p>
|
||||
<!--[](https://opencollective.com/nest#backer)
|
||||
[](https://opencollective.com/nest#sponsor)-->
|
||||
|
||||
## Description
|
||||
|
||||
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
|
||||
|
||||
## Project setup
|
||||
|
||||
```bash
|
||||
$ npm install
|
||||
```
|
||||
|
||||
## Compile and run the project
|
||||
|
||||
```bash
|
||||
# development
|
||||
$ npm run start
|
||||
|
||||
# watch mode
|
||||
$ npm run start:dev
|
||||
|
||||
# production mode
|
||||
$ npm run start:prod
|
||||
```
|
||||
|
||||
## Run tests
|
||||
|
||||
```bash
|
||||
# unit tests
|
||||
$ npm run test
|
||||
|
||||
# e2e tests
|
||||
$ npm run test:e2e
|
||||
|
||||
# test coverage
|
||||
$ npm run test:cov
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.
|
||||
|
||||
If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
|
||||
|
||||
```bash
|
||||
$ npm install -g mau
|
||||
$ mau deploy
|
||||
```
|
||||
|
||||
With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
|
||||
|
||||
## Resources
|
||||
|
||||
Check out a few resources that may come in handy when working with NestJS:
|
||||
|
||||
- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
|
||||
- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
|
||||
- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
|
||||
- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
|
||||
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
|
||||
- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
|
||||
- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
|
||||
- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).
|
||||
|
||||
## Support
|
||||
|
||||
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
|
||||
|
||||
## Stay in touch
|
||||
|
||||
- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
|
||||
- Website - [https://nestjs.com](https://nestjs.com/)
|
||||
- Twitter - [@nestframework](https://twitter.com/nestframework)
|
||||
|
||||
## License
|
||||
|
||||
Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
|
||||
@@ -0,0 +1,35 @@
|
||||
// @ts-check
|
||||
import eslint from '@eslint/js';
|
||||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
||||
import globals from 'globals';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
export default tseslint.config(
|
||||
{
|
||||
ignores: ['eslint.config.mjs'],
|
||||
},
|
||||
eslint.configs.recommended,
|
||||
...tseslint.configs.recommendedTypeChecked,
|
||||
eslintPluginPrettierRecommended,
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
...globals.jest,
|
||||
},
|
||||
ecmaVersion: 5,
|
||||
sourceType: 'module',
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-floating-promises': 'warn',
|
||||
'@typescript-eslint/no-unsafe-argument': 'warn'
|
||||
},
|
||||
},
|
||||
);
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/nest-cli",
|
||||
"collection": "@nestjs/schematics",
|
||||
"sourceRoot": "src",
|
||||
"compilerOptions": {
|
||||
"deleteOutDir": true
|
||||
}
|
||||
}
|
||||
Generated
+11616
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"name": "feria_cuestionario",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
"license": "UNLICENSED",
|
||||
"scripts": {
|
||||
"build": "nest build",
|
||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||
"start": "nest start",
|
||||
"start:dev": "nest start --watch",
|
||||
"start:debug": "nest start --debug --watch",
|
||||
"start:prod": "node dist/main",
|
||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test:cov": "jest --coverage",
|
||||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
||||
"test:e2e": "jest --config ./test/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "^11.0.1",
|
||||
"@nestjs/core": "^11.0.1",
|
||||
"@nestjs/mapped-types": "*",
|
||||
"@nestjs/platform-express": "^11.0.1",
|
||||
"@nestjs/typeorm": "^11.0.0",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"rxjs": "^7.8.1",
|
||||
"typeorm": "^0.3.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.2.0",
|
||||
"@eslint/js": "^9.18.0",
|
||||
"@nestjs/cli": "^11.0.0",
|
||||
"@nestjs/schematics": "^11.0.0",
|
||||
"@nestjs/testing": "^11.0.1",
|
||||
"@swc/cli": "^0.6.0",
|
||||
"@swc/core": "^1.10.7",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^22.10.7",
|
||||
"@types/supertest": "^6.0.2",
|
||||
"eslint": "^9.18.0",
|
||||
"eslint-config-prettier": "^10.0.1",
|
||||
"eslint-plugin-prettier": "^5.2.2",
|
||||
"globals": "^15.14.0",
|
||||
"jest": "^29.7.0",
|
||||
"prettier": "^3.4.2",
|
||||
"source-map-support": "^0.5.21",
|
||||
"supertest": "^7.0.0",
|
||||
"ts-jest": "^29.2.5",
|
||||
"ts-loader": "^9.5.2",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsconfig-paths": "^4.2.0",
|
||||
"typescript": "^5.7.3",
|
||||
"typescript-eslint": "^8.20.0"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
"json",
|
||||
"ts"
|
||||
],
|
||||
"rootDir": "src",
|
||||
"testRegex": ".*\\.spec\\.ts$",
|
||||
"transform": {
|
||||
"^.+\\.(t|j)s$": "ts-jest"
|
||||
},
|
||||
"collectCoverageFrom": [
|
||||
"**/*.(t|j)s"
|
||||
],
|
||||
"coverageDirectory": "../coverage",
|
||||
"testEnvironment": "node"
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import * as request from 'supertest';
|
||||
import { App } from 'supertest/types';
|
||||
import { AppModule } from './../src/app.module';
|
||||
|
||||
describe('AppController (e2e)', () => {
|
||||
let app: INestApplication<App>;
|
||||
|
||||
beforeEach(async () => {
|
||||
const moduleFixture: TestingModule = await Test.createTestingModule({
|
||||
imports: [AppModule],
|
||||
}).compile();
|
||||
|
||||
app = moduleFixture.createNestApplication();
|
||||
await app.init();
|
||||
});
|
||||
|
||||
it('/ (GET)', () => {
|
||||
return request(app.getHttpServer())
|
||||
.get('/')
|
||||
.expect(200)
|
||||
.expect('Hello World!');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"moduleFileExtensions": ["js", "json", "ts"],
|
||||
"rootDir": ".",
|
||||
"testEnvironment": "node",
|
||||
"testRegex": ".e2e-spec.ts$",
|
||||
"transform": {
|
||||
"^.+\\.(t|j)s$": "ts-jest"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"declaration": true,
|
||||
"removeComments": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "ES2023",
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"baseUrl": "./",
|
||||
"incremental": true,
|
||||
"skipLibCheck": true,
|
||||
"strictNullChecks": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noImplicitAny": false,
|
||||
"strictBindCallApply": false,
|
||||
"noFallthroughCasesInSwitch": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user