2024-06-17 11:41:50 -06:00
|
|
|
import { Entity, PrimaryColumn, Column, OneToMany } from 'typeorm';
|
2024-06-17 20:19:58 -06:00
|
|
|
import { Profesor } from "../../Profesor/entities/profesor.entity";
|
2024-06-16 16:54:06 -06:00
|
|
|
|
|
|
|
|
@Entity()
|
2024-06-17 00:59:28 -06:00
|
|
|
export class Edificio {
|
2024-06-17 11:41:50 -06:00
|
|
|
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
|
2024-06-17 00:59:28 -06:00
|
|
|
id_edificio: number;
|
2024-06-16 16:54:06 -06:00
|
|
|
|
2024-06-17 00:59:28 -06:00
|
|
|
@Column({ type: 'varchar', length: 256, nullable: false })
|
|
|
|
|
edificio: string;
|
|
|
|
|
|
2024-06-17 20:19:58 -06:00
|
|
|
@OneToMany(() => Profesor, profesor => profesor.edificio)
|
2024-06-17 11:41:50 -06:00
|
|
|
profesores: Profesor[];
|
2024-06-17 00:59:28 -06:00
|
|
|
}
|