File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
examples/java/java-booking-03_preserve_whole_object/src/main/java/tv/codely/booking Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ public final class Booking {
66 private final BookingId id ;
77 private final LocalDateTime startDate ;
88 private final LocalDateTime endDate ;
9- private final CustomerId customerId ;
10- private final CustomerName customerName ;
11- private final EmailAddress customerEmail ;
9+ private final Customer customer ;
1210 private final BookingType bookingType ;
1311 private final Discount discount ;
1412 private final Tax tax ;
@@ -21,15 +19,13 @@ public Booking(
2119 Discount discount ,
2220 Tax tax
2321 ) {
24- this .id = id ;
25- this .startDate = bookingDateRange .startDate ();
26- this .endDate = bookingDateRange .endDate ();
27- this .customerId = customer .id ();
28- this .customerName = customer .name ();
29- this .customerEmail = customer .emailAddress ();
30- this .bookingType = bookingType ;
31- this .discount = discount ;
32- this .tax = tax ;
22+ this .id = id ;
23+ this .startDate = bookingDateRange .startDate ();
24+ this .endDate = bookingDateRange .endDate ();
25+ this .customer = customer ;
26+ this .bookingType = bookingType ;
27+ this .discount = discount ;
28+ this .tax = tax ;
3329 }
3430
3531 public BookingStatus statusFor (LocalDateTime date ) {
You can’t perform that action at this time.
0 commit comments