15 lines
365 B
TypeScript
15 lines
365 B
TypeScript
import { Miembro } from '../miembro/entity/miembro.entity';
|
|
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
|
|
|
@Entity()
|
|
export class Carrera {
|
|
@PrimaryGeneratedColumn()
|
|
id_carrera: number;
|
|
|
|
@Column({ length: 40, nullable: false })
|
|
carrera: string;
|
|
|
|
@OneToMany(() => Miembro, (miembro) => miembro.carrera)
|
|
miembro: Miembro;
|
|
}
|