micro cambios

This commit is contained in:
xXpuma99Xx 2022-05-10 21:35:53 -05:00
parent a395dd2744
commit 640ba26a97
3 changed files with 11 additions and 14 deletions

View File

@ -1,17 +1,13 @@
import { Controller, Get, Post, Put, Query } from '@nestjs/common';
import { EquipoService } from './equipo.service';
import { EquipoDto } from './dto/equipo.dto';
import {ApiTags} from '@nestjs/swagger'
import { ApiTags } from '@nestjs/swagger';
@Controller('equipo')
@ApiTags('equipo')
export class EquipoController {
constructor(private equipoService: EquipoService) {}
// Para cuando este listo lo de subir archivos... puede que hasta se cambie de controller
@Post()
cargaMasiva() {}
@Get()
get() {
return this.equipoService.findAll();

View File

@ -1,7 +1,7 @@
import { Body, Controller, Delete, Get, Post, Put, Param } from '@nestjs/common';
import { Body, Controller, Delete, Get, Post, Param } from '@nestjs/common';
import { HoraExcepcionService } from './hora-excepcion.service';
import { HoraExcepcionDto } from './dto/hora-excepcion-create.dto'
import {ApiTags} from '@nestjs/swagger'
import { HoraExcepcionDto } from './dto/hora-excepcion-create.dto';
import { ApiTags } from '@nestjs/swagger';
@Controller('hora-excepcion')
@ApiTags('hora-excepcion')
@ -10,17 +10,14 @@ export class HoraExcepcionController {
@Post()
create(@Body() body: HoraExcepcionDto) {
return this.horaExcepcionService.create(body.id_institucion_dia)
return this.horaExcepcionService.create(body.id_institucion_dia);
}
@Delete(':id')
delete(@Param('id') id_hora_excepcion: number) {
return this.horaExcepcionService.delete(id_hora_excepcion)
return this.horaExcepcionService.delete(id_hora_excepcion);
}
@Get()
get() {}
@Put()
update() {}
}

View File

@ -1,4 +1,5 @@
import {
Column,
Entity,
JoinColumn,
ManyToOne,
@ -15,7 +16,10 @@ export class InstitucionCarrera {
@PrimaryGeneratedColumn()
id_institucion_carrera: number;
@ManyToOne(() => Carrera, (carrera) => carrera.instituciones)
@Column({ type: String, nullable: true, length: 4, default: null })
clave_alt: string;
@ManyToOne(() => Carrera, (carrera) => carrera.instituciones, { eager: true })
@JoinColumn({ name: 'id_carrera' })
carrera: Carrera;