actualización tablas

This commit is contained in:
2025-04-01 13:14:30 -06:00
parent 2809dbf33e
commit eeba1c2120
7 changed files with 127 additions and 3 deletions
@@ -0,0 +1,25 @@
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';
@Entity()
export class PreguntaOpcion {
@PrimaryGeneratedColumn()
id_pregunta_opcion: number;
@Column()
posicion: number;
@ManyToOne(() => Pregunta, pregunta => pregunta.id_pregunta)
@Column()
id_pregunta: Pregunta;
@ManyToOne(() => Opcion, opcion => opcion.id_opcion)
@Column()
id_opcion: Opcion;
@OneToMany(()=> RespuestaParticipanteCerrada, respuestaParticipanteCerrada=>respuestaParticipanteCerrada.id_pregunta_opcion)
respuestaParticipanteCerrada:RespuestaParticipanteCerrada[];
}