21 lines
541 B
TypeScript
21 lines
541 B
TypeScript
import { Seccion } from 'src/seccion/entities/seccion.entity';
|
|
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm';
|
|
|
|
|
|
@Entity('seccion_pregunta')
|
|
export class SeccionPregunta {
|
|
@PrimaryGeneratedColumn()
|
|
id_seccion_pregunta: number;
|
|
|
|
@Column({ type: 'tinyint' })
|
|
posicion: number;
|
|
|
|
@ManyToOne(() => Pregunta, (pregunta) => pregunta.id_pregunta)
|
|
@Column({ type: 'int' })
|
|
id_pregunta: number;
|
|
|
|
@ManyToOne(() => Seccion, (seccion) => seccion.id_seccion)
|
|
@Column({ type: 'int' })
|
|
id_seccion: number;
|
|
}
|