institucion-carrera output dto
This commit is contained in:
parent
e3c9680f6b
commit
ee0bbba228
17
src/institucion-carrera/dto/output/carrera.dto.ts
Normal file
17
src/institucion-carrera/dto/output/carrera.dto.ts
Normal 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;
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
12
src/institucion-carrera/dto/output/nivel.dto.ts
Normal file
12
src/institucion-carrera/dto/output/nivel.dto.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { Expose } from 'class-transformer';
|
||||||
|
|
||||||
|
export class NivelOutputDto {
|
||||||
|
@Expose()
|
||||||
|
id_nivel;
|
||||||
|
|
||||||
|
@Expose()
|
||||||
|
clave;
|
||||||
|
|
||||||
|
@Expose()
|
||||||
|
nivel;
|
||||||
|
}
|
@ -1,13 +1,16 @@
|
|||||||
import { Controller, Get, Query } from '@nestjs/common';
|
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 { InstitucionCarreraService } from './institucion-carrera.service';
|
||||||
import { IdInstitucionDto } from '../dto/id-institucion.dto';
|
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')
|
@Controller('institucion-carrera')
|
||||||
@ApiTags('institucion-carrera')
|
@ApiTags('institucion-carrera')
|
||||||
export class InstitucionCarreraController {
|
export class InstitucionCarreraController {
|
||||||
constructor(private institucionCarreraService: InstitucionCarreraService) {}
|
constructor(private institucionCarreraService: InstitucionCarreraService) {}
|
||||||
|
|
||||||
|
@Serealize(InstitucionCarreaOutputDto)
|
||||||
@Get()
|
@Get()
|
||||||
@ApiOperation({
|
@ApiOperation({
|
||||||
description: 'Endpoint que retorna todas las carreras de una institución.',
|
description: 'Endpoint que retorna todas las carreras de una institución.',
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
import { Expose } from 'class-transformer';
|
|
||||||
|
|
||||||
export class InstitucionMinOutputDto {
|
|
||||||
@Expose()
|
|
||||||
id_institucion;
|
|
||||||
|
|
||||||
@Expose()
|
|
||||||
institucion;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user