From d6e97e7f987f453ceee392a52cf063c45fa2cd85 Mon Sep 17 00:00:00 2001 From: xXpuma99Xx <51341582+xXpuma99Xx@users.noreply.github.com> Date: Sun, 17 Apr 2022 20:56:02 -0500 Subject: [PATCH] carrera progrma listo --- src/app.module.ts | 2 +- .../carrera-programa.controller.ts | 14 ++++++++++++-- src/carrera-programa/carrera-programa.module.ts | 2 +- src/carrera-programa/carrera-programa.service.ts | 2 +- .../{ => entity}/carrera-programa.entity.ts | 4 ++-- src/carrera/entity/carrera.entity.ts | 2 +- src/programa/programa.entity.ts | 2 +- 7 files changed, 19 insertions(+), 9 deletions(-) rename src/carrera-programa/{ => entity}/carrera-programa.entity.ts (78%) diff --git a/src/app.module.ts b/src/app.module.ts index a97948b..2eaaafd 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -28,7 +28,7 @@ import { EquipoTipoEntradaModule } from './equipo-tipo-entrada/equipo-tipo-entra import { CarreraProgramaModule } from './carrera-programa/carrera-programa.module'; import { Carrera } from './carrera/entity/carrera.entity'; -import { CarreraPrograma } from './carrera-programa/carrera-programa.entity'; +import { CarreraPrograma } from './carrera-programa/entity/carrera-programa.entity'; import { Carrito } from './carrito/entity/carrito.entity'; import { Dia } from './dia/dia.entity'; import { Equipo } from './equipo/equipo.entity'; diff --git a/src/carrera-programa/carrera-programa.controller.ts b/src/carrera-programa/carrera-programa.controller.ts index 8cc05f2..c07e305 100644 --- a/src/carrera-programa/carrera-programa.controller.ts +++ b/src/carrera-programa/carrera-programa.controller.ts @@ -1,9 +1,19 @@ -import { Controller, Get, Post, Put } from '@nestjs/common'; +import { Controller, Delete, Get, Post, Put } from '@nestjs/common'; import { CarreraProgramaService } from './carrera-programa.service'; @Controller('carrera-programa') export class CarreraProgramaController { constructor(private carreraProgramaService: CarreraProgramaService) {} - + @Post() + create() {} + + @Delete() + delete() {} + + @Get() + get() {} + + @Put() + update() {} } diff --git a/src/carrera-programa/carrera-programa.module.ts b/src/carrera-programa/carrera-programa.module.ts index 399a5c4..596dead 100644 --- a/src/carrera-programa/carrera-programa.module.ts +++ b/src/carrera-programa/carrera-programa.module.ts @@ -2,7 +2,7 @@ import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { CarreraProgramaController } from './carrera-programa.controller'; import { CarreraProgramaService } from './carrera-programa.service'; -import { CarreraPrograma } from './carrera-programa.entity'; +import { CarreraPrograma } from './entity/carrera-programa.entity'; @Module({ imports: [TypeOrmModule.forFeature([CarreraPrograma])], diff --git a/src/carrera-programa/carrera-programa.service.ts b/src/carrera-programa/carrera-programa.service.ts index 5745308..f1d7ed9 100644 --- a/src/carrera-programa/carrera-programa.service.ts +++ b/src/carrera-programa/carrera-programa.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; -import { CarreraPrograma } from './carrera-programa.entity'; +import { CarreraPrograma } from './entity/carrera-programa.entity'; @Injectable() export class CarreraProgramaService { diff --git a/src/carrera-programa/carrera-programa.entity.ts b/src/carrera-programa/entity/carrera-programa.entity.ts similarity index 78% rename from src/carrera-programa/carrera-programa.entity.ts rename to src/carrera-programa/entity/carrera-programa.entity.ts index ff84f69..496e7b3 100644 --- a/src/carrera-programa/carrera-programa.entity.ts +++ b/src/carrera-programa/entity/carrera-programa.entity.ts @@ -1,6 +1,6 @@ import { Entity, PrimaryGeneratedColumn, ManyToOne, JoinColumn } from 'typeorm'; -import { Carrera } from '../carrera/entity/carrera.entity'; -import { Programa } from '../programa/programa.entity'; +import { Carrera } from '../../carrera/entity/carrera.entity'; +import { Programa } from '../../programa/programa.entity'; @Entity() export class CarreraPrograma { diff --git a/src/carrera/entity/carrera.entity.ts b/src/carrera/entity/carrera.entity.ts index 2ed9653..255b6bc 100644 --- a/src/carrera/entity/carrera.entity.ts +++ b/src/carrera/entity/carrera.entity.ts @@ -6,7 +6,7 @@ import { OneToMany, PrimaryGeneratedColumn, } from 'typeorm'; -import { CarreraPrograma } from '../../carrera-programa/carrera-programa.entity'; +import { CarreraPrograma } from '../../carrera-programa/entity/carrera-programa.entity'; import { Institucion } from '../../institucion/entity/institucion.entity'; import { Usuario } from '../../usuario/usuario.entity'; diff --git a/src/programa/programa.entity.ts b/src/programa/programa.entity.ts index fd86cd3..df2a868 100644 --- a/src/programa/programa.entity.ts +++ b/src/programa/programa.entity.ts @@ -1,6 +1,6 @@ import { Entity, Column, PrimaryGeneratedColumn, OneToMany } from 'typeorm'; import { Equipo } from '../equipo/equipo.entity'; -import { CarreraPrograma } from '../carrera-programa/carrera-programa.entity'; +import { CarreraPrograma } from '../carrera-programa/entity/carrera-programa.entity'; @Entity() export class Programa {