reporte csv

This commit is contained in:
Your Name
2025-04-07 15:06:03 -06:00
parent 60127068aa
commit 297e9913bb
5 changed files with 193 additions and 8 deletions
@@ -1,7 +1,7 @@
import { Opcion } from 'src/opcion/entities/opcion.entity';
import { Pregunta } from 'src/pregunta/entities/pregunta.entity';
import { RespuestaParticipanteCerrada } from 'src/respuesta_participante_cerrada/entities/respuesta_participante_cerrada.entity';
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, OneToMany } from 'typeorm';
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, OneToMany, JoinColumn } from 'typeorm';
@Entity()
@@ -13,13 +13,18 @@ export class PreguntaOpcion {
posicion: number;
@ManyToOne(() => Pregunta)
@JoinColumn({ name: 'id_pregunta' })
pregunta: Pregunta;
@Column()
id_pregunta: number;
@ManyToOne(() => Opcion, opcion => opcion.preguntasOpciones)
@JoinColumn({ name: 'id_opcion' })
opcion: Opcion;
@Column()
id_opcion: number;
@OneToMany(()=> RespuestaParticipanteCerrada, respuestaParticipanteCerrada=>respuestaParticipanteCerrada.preguntaOpcion)
respuestaParticipanteCerrada:RespuestaParticipanteCerrada[];