2022-05-09 16:49:41 -05:00
|
|
|
import {
|
|
|
|
|
Column,
|
|
|
|
|
Entity,
|
|
|
|
|
JoinColumn,
|
|
|
|
|
ManyToOne,
|
|
|
|
|
PrimaryGeneratedColumn,
|
|
|
|
|
} from 'typeorm';
|
|
|
|
|
import { Institucion } from '../../institucion/entity/institucion.entity';
|
2022-05-31 14:26:57 -05:00
|
|
|
import { Programa } from './programa.entity';
|
2022-05-09 16:49:41 -05:00
|
|
|
|
|
|
|
|
@Entity()
|
|
|
|
|
export class InstitucionPrograma {
|
|
|
|
|
@PrimaryGeneratedColumn()
|
2022-05-13 12:16:24 -05:00
|
|
|
id_institucion_programa: number;
|
2022-05-09 16:49:41 -05:00
|
|
|
|
|
|
|
|
@Column({ type: Boolean, nullable: false, default: false })
|
|
|
|
|
mostrar: boolean;
|
|
|
|
|
|
2022-10-24 07:52:28 -05:00
|
|
|
@Column({ type: Number, nullable: true })
|
|
|
|
|
id_institucion: number;
|
|
|
|
|
|
|
|
|
|
@Column({ type: Number, nullable: true })
|
|
|
|
|
id_programa: number;
|
|
|
|
|
|
2022-12-22 07:08:21 -06:00
|
|
|
@ManyToOne(() => Institucion, (institucion) => institucion.programas, {
|
|
|
|
|
eager: true,
|
|
|
|
|
})
|
2022-06-22 11:45:00 -05:00
|
|
|
@JoinColumn({ name: 'id_institucion' })
|
|
|
|
|
institucion: Institucion;
|
|
|
|
|
|
2022-05-31 15:07:57 -05:00
|
|
|
@ManyToOne(() => Programa, (programa) => programa.instituciones, {
|
|
|
|
|
eager: true,
|
|
|
|
|
})
|
2022-05-09 16:49:41 -05:00
|
|
|
@JoinColumn({ name: 'id_programa' })
|
|
|
|
|
programa: Programa;
|
|
|
|
|
}
|