Cambios en las relaciones de evento, participante_evento y participante.

This commit is contained in:
santiago
2025-04-02 09:15:14 -06:00
parent fbd753d27e
commit 7b72ee4ec6
18 changed files with 305 additions and 39 deletions
+8 -5
View File
@@ -1,5 +1,6 @@
import { Participante } from "src/participante/participante.entity";
import { ParticipanteEvento } from "src/participante_evento/participante_evento.entity";
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { Column, Entity, ManyToMany, OneToMany, PrimaryGeneratedColumn } from "typeorm";
@Entity()
export class Evento {
@@ -26,13 +27,15 @@ export class Evento {
@JoinColumn({ name: "id_administrador" })
administrador: Administrador;
@OneToMany(() => ParticipanteEvento, (pe) => pe.evento)
participantes: ParticipanteEvento[];
@OneToMany(() => Asistencia, (asistencia) => asistencia.evento)
asistencias: Asistencia[];
*/
@OneToMany(() => ParticipanteEvento, (participanteEvento) => participanteEvento.evento)
participantes: ParticipanteEvento[];
@OneToMany(() => ParticipanteEvento, participanteEvento => participanteEvento.evento)
participanteEventos: ParticipanteEvento[];
}
+2 -1
View File
@@ -7,6 +7,7 @@ import { Evento } from './evento.entity';
@Module({
imports: [TypeOrmModule.forFeature([Evento])],
controllers: [EventoController],
providers: [EventoService]
providers: [EventoService],
exports: [EventoService]
})
export class EventoModule {}