import { Entity, PrimaryColumn, Column, OneToMany } from 'typeorm'; import { Profesor } from "../../Profesor/entities/profesor.entity"; @Entity() export class Edificio { @PrimaryColumn({ type: 'int', nullable: false }) id_edificio: number; @Column({ type: 'varchar', length: 256, nullable: false }) edificio: string; @OneToMany(() => Profesor, profesor => profesor.edificio) profesores: Profesor[]; }