listo programa
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
import { Entity, Column, PrimaryGeneratedColumn, OneToMany } from 'typeorm';
|
||||
import { Equipo } from '../equipo/entity/equipo.entity';
|
||||
import { CarreraPrograma } from '../carrera-programa/entity/carrera-programa.entity';
|
||||
import { CarreraPrograma } from '../../carrera-programa/entity/carrera-programa.entity';
|
||||
import { Equipo } from '../../equipo/entity/equipo.entity';
|
||||
|
||||
@Entity()
|
||||
export class Programa {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_programa: number;
|
||||
|
||||
@Column()
|
||||
@Column({ type: String, nullable: false, length: 100 })
|
||||
programa: string;
|
||||
|
||||
@OneToMany(() => Equipo, (equipo) => equipo.programa)
|
||||
equipos: Equipo[];
|
||||
|
||||
@OneToMany(
|
||||
() => CarreraPrograma,
|
||||
(carreraPrograma) => carreraPrograma.programa,
|
||||
)
|
||||
carrerasPrograma: CarreraPrograma[];
|
||||
|
||||
@OneToMany(() => Equipo, (equipo) => equipo.programa)
|
||||
equipos: Equipo[];
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { ProgramaService } from './programa.service';
|
||||
|
||||
@Controller('programa')
|
||||
export class ProgramaController {
|
||||
constructor(private programaService: ProgramaService) {}
|
||||
|
||||
@Get()
|
||||
get() {}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { ProgramaController } from './programa.controller';
|
||||
import { Programa } from './programa.entity';
|
||||
import { ProgramaService } from './programa.service';
|
||||
import { Programa } from './entity/programa.entity';
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([Programa])],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Repository } from 'typeorm';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Programa } from './programa.entity';
|
||||
import { Repository } from 'typeorm';
|
||||
import { Programa } from './entity/programa.entity';
|
||||
|
||||
@Injectable()
|
||||
export class ProgramaService {
|
||||
|
||||
Reference in New Issue
Block a user