listo programa
This commit is contained in:
parent
cbd0c4fe3c
commit
a1b609f107
@ -43,7 +43,7 @@ import { Motivo } from './motivo/entity/motivo.entity';
|
||||
import { Multa } from './multa/entity/multa.entity';
|
||||
import { Operador } from './operador/entity/operador.entity';
|
||||
import { Prestamo } from './prestamo/entity/prestamo.entity';
|
||||
import { Programa } from './programa/programa.entity';
|
||||
import { Programa } from './programa/entity/programa.entity';
|
||||
import { Status } from './status/status.entity';
|
||||
import { TipoCarrito } from './tipo-carrito/tipo-carrito.entity';
|
||||
import { TipoEntrada } from './tipo-entrada/tipo-entrada.entity';
|
||||
|
@ -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 { Programa } from '../../programa/entity/programa.entity';
|
||||
|
||||
@Entity()
|
||||
export class CarreraPrograma {
|
||||
|
@ -10,7 +10,7 @@ import { Carrito } from '../../carrito/entity/carrito.entity';
|
||||
import { EquipoTipoEntrada } from '../../equipo-tipo-entrada/entity/equipo-tipo-entrada.entity';
|
||||
import { Motivo } from '../../motivo/entity/motivo.entity';
|
||||
import { Prestamo } from '../../prestamo/entity/prestamo.entity';
|
||||
import { Programa } from '../../programa/programa.entity';
|
||||
import { Programa } from '../../programa/entity/programa.entity';
|
||||
import { Status } from '../../status/status.entity';
|
||||
|
||||
@Entity()
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user