Entidades y Realciones(Falta enrutar bien)
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
import { Entity, PrimaryColumn, Column, OneToMany } from 'typeorm';
|
||||
import { Profesor } from './profesor.entity';
|
||||
|
||||
@Entity({ name: 'adscripcion' })
|
||||
@Entity()
|
||||
export class Adscripcion {
|
||||
|
||||
@PrimaryColumn({ type: 'int', length: 11, nullable: false })
|
||||
id_adscripcion: number;
|
||||
|
||||
@Column({ type: 'varchar', length: 150, nullable: false })
|
||||
adscripcion: string;
|
||||
|
||||
@OneToMany(() => Profesor, profesor => Profesor.adscripcion)
|
||||
profesores: Profesor[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user