Files
api_directorio/src/edificio/entities/edificio.entity.ts
T

14 lines
350 B
TypeScript
Raw Normal View History

2024-06-17 11:41:50 -06:00
import { Entity, PrimaryColumn, Column, OneToMany } from 'typeorm';
2024-06-16 16:54:06 -06:00
@Entity()
2024-06-17 00:59:28 -06:00
export class Edificio {
2024-06-18 13:27:10 -06:00
@PrimaryColumn({ type: 'int', 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-18 15:21:34 -06:00
@OneToMany(() => Edificio, edificio => edificio.profesores)
profesores: Edificio[];
2024-06-17 00:59:28 -06:00
}