26 lines
666 B
TypeScript
26 lines
666 B
TypeScript
import { Pregunta } from 'src/pregunta/entities/pregunta.entity';
|
|
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.seccionPreguntas)
|
|
pregunta: Pregunta;
|
|
|
|
@Column({ type: 'int' })
|
|
id_pregunta: number;
|
|
|
|
@ManyToOne(() => Seccion, (seccion) => seccion.seccionPreguntas)
|
|
seccion: Seccion;
|
|
|
|
@Column({ type: 'int' })
|
|
id_seccion: number;
|
|
}
|