actualización tablas
This commit is contained in:
@@ -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[];
|
||||
}
|
||||
Reference in New Issue
Block a user