From c08920f3887c11c0f42f881b16e1619ba36c3e08 Mon Sep 17 00:00:00 2001 From: Marco De Luca <31864038+markdeluk@users.noreply.github.com> Date: Mon, 8 Jan 2024 11:24:06 +0100 Subject: [PATCH] Reverting some changes --- api/src/availability/availability.entity.ts | 4 ++-- api/src/timeslots/timeslot.entity.ts | 3 --- api/src/users/user.entity.ts | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/api/src/availability/availability.entity.ts b/api/src/availability/availability.entity.ts index 51aafd4..1153fa7 100644 --- a/api/src/availability/availability.entity.ts +++ b/api/src/availability/availability.entity.ts @@ -22,9 +22,9 @@ export class Availability implements AvailabilityInterface { @Column({ name: 'last_modified' }) lastModified: Date; @Column({ name: 'time_slot' }) - @ManyToOne(() => TimeSlot, (timeSlot) => timeSlot.availabilities) + @ManyToOne(() => TimeSlot) timeSlot: TimeSlot; - @ManyToOne(() => User, (user) => user.availabilities) + @ManyToOne(() => User) @JoinColumn() user: User; } diff --git a/api/src/timeslots/timeslot.entity.ts b/api/src/timeslots/timeslot.entity.ts index b46e4f7..f5f784e 100644 --- a/api/src/timeslots/timeslot.entity.ts +++ b/api/src/timeslots/timeslot.entity.ts @@ -12,7 +12,4 @@ export class TimeSlot implements TimeSlotInterface { @Column() end: Date; - - @OneToMany(() => Availability, (availability) => availability.timeSlot) - availabilities: Availability[]; } diff --git a/api/src/users/user.entity.ts b/api/src/users/user.entity.ts index 8807c2e..e4e070d 100644 --- a/api/src/users/user.entity.ts +++ b/api/src/users/user.entity.ts @@ -27,7 +27,4 @@ export class User implements Person { @Column() role: Role; - - @OneToMany(() => Availability, (availability) => availability.user) - availabilities: Availability[]; }