Entidades y Realciones(Falta enrutar bien)

This commit is contained in:
TioSam77
2024-06-17 11:41:50 -06:00
parent 78815b3d31
commit b8c9361aea
12 changed files with 159 additions and 81 deletions
@@ -1,12 +1,14 @@
import { Entity, PrimaryColumn, Column, OneToMany } from 'typeorm';
import { Profesor } from './profesor.entity';
@Entity({ name: 'adscripcion' })
@Entity()
export class Adscripcion {
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
id_adscripcion: number;
@Column({ type: 'varchar', length: 150, nullable: false })
adscripcion: string;
@OneToMany(() => Profesor, profesor => Profesor.adscripcion)
profesores: Profesor[];
}