14 lines
369 B
TypeScript
14 lines
369 B
TypeScript
import { Entity, PrimaryColumn, Column, OneToMany} from 'typeorm';
|
|
|
|
@Entity({ name: 'edificio' })
|
|
export class Edificio {
|
|
@PrimaryColumn({ type: 'int', nullable: false })
|
|
id_edificio: number;
|
|
|
|
@Column({ type: 'varchar', length: 256, nullable: false })
|
|
edificio: string;
|
|
|
|
@OneToMany(() => Edificio, edificio => edificio.profesores)
|
|
profesores: Edificio[];
|
|
}
|