15 lines
466 B
TypeScript
15 lines
466 B
TypeScript
import { Entity, PrimaryColumn, Column, OneToMany, Index } from 'typeorm';
|
|
|
|
@Entity({ name: 'adscripcion' })
|
|
@Index('PK_adscripcion', ['id_adscripcion'], { unique: true })
|
|
export class Adscripcion {
|
|
@PrimaryColumn({ type: 'int', nullable: false })
|
|
id_adscripcion: number;
|
|
|
|
@Column({ type: 'varchar', length: 150, nullable: false })
|
|
adscripcion: string;
|
|
|
|
@OneToMany(() => Adscripcion, (adscripcion) => adscripcion.profesores)
|
|
profesores: Adscripcion[];
|
|
}
|