Skip to content

Commit

Permalink
refactor(recurring_booking_occurrence): extend SingleBooking
Browse files Browse the repository at this point in the history
  • Loading branch information
albertms10 committed Jan 14, 2023
1 parent 41a0c0e commit 10c06a9
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions lib/src/model/booking/recurring_booking_occurrence.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import '../cabin/cabin.dart';
import 'booking.dart';
import 'recurring_booking.dart';
import 'single_booking.dart';

class RecurringBookingOccurrence extends Booking {
class RecurringBookingOccurrence extends SingleBooking {
/// The [RecurringBooking] reference, if this [Booking] is part of a series of
/// recurring bookings.
RecurringBooking? recurringBooking;
Expand Down Expand Up @@ -34,24 +34,6 @@ class RecurringBookingOccurrence extends Booking {
cabin: booking.cabin,
);

@override
RecurringBookingOccurrence copyWith({
String? id,
DateTime? startDate,
DateTime? endDate,
String? description,
bool? isLocked,
Cabin? cabin,
}) =>
RecurringBookingOccurrence(
id: id ?? this.id,
startDate: startDate ?? this.startDate,
endDate: endDate ?? this.endDate,
description: description ?? this.description,
isLocked: isLocked ?? this.isLocked,
cabin: cabin ?? this.cabin,
);

@override
// ignore: hash_and_equals
bool operator ==(Object other) =>
Expand Down

0 comments on commit 10c06a9

Please sign in to comment.