- Timestamp:
- 04/30/25 18:24:41 (2 weeks ago)
- Branches:
- main
- Children:
- 2518b3a
- Parents:
- deea3c4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/rezevirajmasa/demo/model/Reservation.java
rdeea3c4 re15e8d9 4 4 import com.fasterxml.jackson.annotation.JsonManagedReference; 5 5 import jakarta.persistence.*; 6 import lombok.Data; 7 import lombok.Getter; 8 import lombok.Setter; 6 9 7 10 import java.math.BigDecimal; 8 11 import java.time.LocalDateTime; 9 12 import java.time.LocalTime; 13 import java.util.ArrayList; 14 import java.util.List; 10 15 11 16 @Entity 12 17 @Table(name = "reservations") 18 @Data 13 19 public class Reservation { 14 20 … … 47 53 private LocalDateTime checkInTime; 48 54 55 @Getter 49 56 @Column(name = "CheckOutTime") 50 57 private LocalDateTime checkOutTime; 51 58 52 // @Column(name = "TotalAmount", precision = 8, scale = 2) 53 // private BigDecimal totalAmount; 59 @ElementCollection 60 @CollectionTable(name = "reservation_preordered_items", joinColumns = @JoinColumn(name = "reservation_id")) 61 @Column(name = "item") 62 private List<String> preOrderedItems = new ArrayList<>(); 54 63 55 64 @Column(name = "PaymentStatus", length = 20, nullable = false, columnDefinition = "VARCHAR default 'Unpaid'") … … 71 80 72 81 public Reservation(User user, TableEntity table, Restaurant restaurant, LocalDateTime reservationDateTime, int partySize, String specialRequests, String status, LocalDateTime checkInTime, LocalDateTime checkOutTime, String paymentStatus) { 73 // this.customer = customer;74 82 this.table = table; 75 83 this.user = user; … … 84 92 } 85 93 86 public User getUser() {87 return user;88 }89 90 public void setUser(User user) {91 this.user = user;92 }93 94 public Long getReservationID() {95 return reservationID;96 }97 98 public void setReservationID(Long reservationID) {99 this.reservationID = reservationID;100 }101 102 103 public TableEntity getTable() {104 return table;105 }106 107 public void setTable(TableEntity table) {108 this.table = table;109 }110 111 public Restaurant getRestaurant() {112 return restaurant;113 }114 115 public void setRestaurant(Restaurant restaurant) {116 this.restaurant = restaurant;117 }118 119 public LocalDateTime getReservationDateTime() {120 return reservationDateTime;121 }122 123 public void setReservationDateTime(LocalDateTime reservationDateTime) {124 this.reservationDateTime = reservationDateTime;125 }126 127 public int getPartySize() {128 return partySize;129 }130 131 public void setPartySize(int partySize) {132 this.partySize = partySize;133 }134 135 public String getSpecialRequests() {136 return specialRequests;137 }138 139 public void setSpecialRequests(String specialRequests) {140 this.specialRequests = specialRequests;141 }142 143 public String getStatus() {144 return status;145 }146 147 public void setStatus(String status) {148 this.status = status;149 }150 151 public LocalDateTime getCheckInTime() {152 return checkInTime;153 }154 155 public void setCheckInTime(LocalDateTime checkInTime) {156 this.checkInTime = checkInTime;157 }158 159 public LocalDateTime getCheckOutTime() {160 return checkOutTime;161 }162 163 public void setCheckOutTime(LocalDateTime checkOutTime) {164 this.checkOutTime = checkOutTime;165 }166 167 public String getPaymentStatus() {168 return paymentStatus;169 }170 171 public void setPaymentStatus(String paymentStatus) {172 this.paymentStatus = paymentStatus;173 }174 94 175 95 @Override
Note:
See TracChangeset
for help on using the changeset viewer.