add booking

This commit is contained in:
Roland Schneider
2025-11-20 22:55:31 +01:00
parent 085605f85c
commit 02cad3dbcd
27 changed files with 1330 additions and 41 deletions

View File

@@ -12,6 +12,7 @@ import {
import { EventType } from './event-type.entity';
import { RecurrenceRule } from './recurrence-rule.entity';
import { EventException } from './event-exception.entity';
import { Booking } from './booking.entity';
@Entity('events')
export class Event {
@@ -63,4 +64,9 @@ export class Event {
cascade: true, // Automatically save/update exceptions when event is saved
})
exceptions: EventException[];
}
@OneToMany(() => Booking, (booking) => booking.event, {
cascade: true, // Automatically save/update exceptions when event is saved
})
bookings: Booking[];
}