Cambios en las relaciones de evento, participante_evento y participante.
This commit is contained in:
@@ -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[];
|
||||
|
||||
}
|
||||
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user