institucion-carrera output dto

This commit is contained in:
xXpuma99Xx 2022-06-13 12:21:27 -05:00
parent e3c9680f6b
commit ee0bbba228
5 changed files with 52 additions and 10 deletions

View File

@ -0,0 +1,17 @@
import { Expose, Type } from 'class-transformer';
import { NivelOutputDto } from './nivel.dto';
export class CarreaOutputDto {
@Expose()
id_carrera;
@Expose()
carrera;
@Expose()
clave;
@Expose()
@Type(() => NivelOutputDto)
nivel;
}

View File

@ -0,0 +1,19 @@
import { Expose, Type } from 'class-transformer';
import { CarreaOutputDto } from './carrera.dto';
import { InstitucionesOutputDto } from '../../../institucion/dto/output/instituciones.dto';
export class InstitucionCarreaOutputDto {
@Expose()
id_institucion_carrera;
@Expose()
clave_alt;
@Expose()
@Type(() => CarreaOutputDto)
carrera;
@Expose()
@Type(() => InstitucionesOutputDto)
institucion;
}

View File

@ -0,0 +1,12 @@
import { Expose } from 'class-transformer';
export class NivelOutputDto {
@Expose()
id_nivel;
@Expose()
clave;
@Expose()
nivel;
}

View File

@ -1,13 +1,16 @@
import { Controller, Get, Query } from '@nestjs/common';
import { ApiOperation, ApiQuery, ApiTags } from '@nestjs/swagger';
import { Serealize } from '../interceptors/serialize.interceptor';
import { InstitucionCarreraService } from './institucion-carrera.service';
import { IdInstitucionDto } from '../dto/id-institucion.dto';
import { ApiOperation, ApiQuery, ApiTags } from '@nestjs/swagger';
import { InstitucionCarreaOutputDto } from './dto/output/institucion-carrera.dto';
@Controller('institucion-carrera')
@ApiTags('institucion-carrera')
export class InstitucionCarreraController {
constructor(private institucionCarreraService: InstitucionCarreraService) {}
@Serealize(InstitucionCarreaOutputDto)
@Get()
@ApiOperation({
description: 'Endpoint que retorna todas las carreras de una institución.',

View File

@ -1,9 +0,0 @@
import { Expose } from 'class-transformer';
export class InstitucionMinOutputDto {
@Expose()
id_institucion;
@Expose()
institucion;
}