algo
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import { Controller, Get, Post, Put } from '@nestjs/common';
|
||||
import { CarreraProgramaService } from './carrera-programa.service';
|
||||
|
||||
@Controller('carrera-programa')
|
||||
export class CarreraProgramaController {
|
||||
constructor(private carreraProgramaService: CarreraProgramaService) {}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
} from 'typeorm';
|
||||
import { Carrera } from '../carrera/carrera.entity';
|
||||
import { Entity, PrimaryGeneratedColumn, ManyToOne, JoinColumn } from 'typeorm';
|
||||
import { Carrera } from '../carrera/entity/carrera.entity';
|
||||
import { Programa } from '../programa/programa.entity';
|
||||
|
||||
@Entity()
|
||||
@@ -13,11 +7,11 @@ export class CarreraPrograma {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_carrera_programa: number;
|
||||
|
||||
@ManyToOne(() => Programa, (programa) => programa.carrerasPrograma)
|
||||
@JoinColumn({ name: 'id_programa' })
|
||||
programa: Programa;
|
||||
|
||||
@ManyToOne(() => Carrera, (carrera) => carrera.carreraProgramas)
|
||||
@JoinColumn({ name: 'id_carrera' })
|
||||
carrera: Carrera;
|
||||
|
||||
@ManyToOne(() => Programa, (programa) => programa.carrerasPrograma)
|
||||
@JoinColumn({ name: 'id_programa' })
|
||||
programa: Programa;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { CarreraProgramaController } from './carrera-programa.controller';
|
||||
import { CarreraPrograma } from './carrera-programa.entity';
|
||||
import { CarreraProgramaService } from './carrera-programa.service';
|
||||
import { CarreraPrograma } from './carrera-programa.entity';
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([CarreraPrograma])],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Repository } from 'typeorm';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { CarreraPrograma } from './carrera-programa.entity';
|
||||
|
||||
@Injectable()
|
||||
|
||||
Reference in New Issue
Block a user