Files
api_directorio/src/edificio/entities/edificio.entity.ts
T
TioSam77 08d196a2fc S
2024-06-18 13:14:31 -06:00

15 lines
416 B
TypeScript

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[];
}