Changeset b67dfd3 for src/main/java/com/example/rezevirajmasa/demo/model
- Timestamp:
- 05/06/25 00:44:02 (13 days ago)
- Branches:
- main
- Children:
- e48199a
- Parents:
- 142c0f8
- Location:
- src/main/java/com/example/rezevirajmasa/demo/model
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/rezevirajmasa/demo/model/Menu.java
r142c0f8 rb67dfd3 26 26 private String itemName; 27 27 28 @Column(name = " category", length = 50)29 private String category;28 @Column(name = "menuCategory", length = 50) 29 private String menuCategory; 30 30 31 31 @Column(name = "price", precision = 8, scale = 2) … … 45 45 this.restaurant = restaurant; 46 46 this.itemName = itemName; 47 this. category = category;47 this.menuCategory = category; 48 48 this.price = price; 49 49 this.description = description; -
src/main/java/com/example/rezevirajmasa/demo/model/MenuTag.java
r142c0f8 rb67dfd3 11 11 @Id 12 12 @GeneratedValue(strategy = GenerationType.IDENTITY) 13 private Long id;13 private Long menuTagId; 14 14 15 15 @ManyToOne(fetch = FetchType.LAZY) -
src/main/java/com/example/rezevirajmasa/demo/model/PreorderedItem.java
r142c0f8 rb67dfd3 20 20 @Id 21 21 @GeneratedValue(strategy = GenerationType.IDENTITY) 22 private Long id;22 private Long preorderedItemId; 23 23 24 private String name;24 private String preorderedItemName; 25 25 26 26 private Integer quantity; -
src/main/java/com/example/rezevirajmasa/demo/model/Reservation.java
r142c0f8 rb67dfd3 48 48 49 49 @Column(name = "Status", length = 20, nullable = false) 50 private String status;50 private String reservationStatus; 51 51 52 52 @Column(name = "CheckInTime") … … 57 57 private LocalDateTime checkOutTime; 58 58 59 // @ElementCollection 60 // @CollectionTable(name = "reservation_preordered_items", joinColumns = @JoinColumn(name = "reservation_id")) 61 // @Column(name = "item") 62 // private List<String> preOrderedItems = new ArrayList<>(); 63 @OneToMany(mappedBy = "reservation", cascade = CascadeType.ALL, orphanRemoval = true) 59 @OneToMany(mappedBy = "reservation", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY) 64 60 private List<PreorderedItem> preOrderedItems = new ArrayList<>(); 65 61 … … 73 69 @PrePersist 74 70 private void prePersist() { 75 if ( status == null) {76 status = "Pending";71 if (reservationStatus == null) { 72 reservationStatus = "Pending"; 77 73 } 78 74 if (paymentStatus == null) { … … 88 84 this.partySize = partySize; 89 85 this.specialRequests = specialRequests; 90 this. status = status;86 this.reservationStatus = status; 91 87 this.checkInTime = checkInTime; 92 88 this.checkOutTime = checkOutTime; … … 105 101 ", partySize=" + partySize + 106 102 ", specialRequests='" + specialRequests + '\'' + 107 ", status='" + status + '\'' +103 ", status='" + reservationStatus + '\'' + 108 104 ", checkInTime=" + checkInTime + 109 105 ", checkOutTime=" + checkOutTime + -
src/main/java/com/example/rezevirajmasa/demo/model/Restaurant.java
r142c0f8 rb67dfd3 146 146 @Id 147 147 @GeneratedValue(strategy = GenerationType.IDENTITY) 148 private Long id;148 private Long reservationHistoryId; 149 149 150 150 @ManyToOne … … 170 170 171 171 @Column(name = "status") 172 private String status;172 private String reservationStatus; 173 173 174 174 @Column(name = "cancellation_reason") … … 185 185 this.partySize = partySize; 186 186 this.specialRequests = specialRequests; 187 this. status = status;187 this.reservationStatus = status; 188 188 this.cancellationReason = cancellationReason; 189 189 this.checkInDate = checkInDate; … … 194 194 195 195 public Long getId() { 196 return id;196 return reservationHistoryId; 197 197 } 198 198 199 199 public void setId(Long id) { 200 this. id = id;200 this.reservationHistoryId = id; 201 201 } 202 202 … … 242 242 243 243 public String getStatus() { 244 return status;244 return reservationStatus; 245 245 } 246 246 247 247 public void setStatus(String status) { 248 this. status = status;248 this.reservationStatus = status; 249 249 } 250 250 … … 276 276 public String toString() { 277 277 return "ReservationHistory{" + 278 "id=" + id +278 "id=" + reservationHistoryId + 279 279 ", user=" + user + 280 280 ", table=" + table + … … 283 283 ", partySize=" + partySize + 284 284 ", specialRequests='" + specialRequests + '\'' + 285 ", status='" + status + '\'' +285 ", status='" + reservationStatus + '\'' + 286 286 ", cancellationReason='" + cancellationReason + '\'' + 287 287 ", checkInDate=" + checkInDate + -
src/main/java/com/example/rezevirajmasa/demo/model/TableEntity.java
r142c0f8 rb67dfd3 36 36 private int capacity; 37 37 38 @Column(name = " Location")39 private String location;38 @Column(name = "tableLocation") 39 private String tableLocation; 40 40 41 41 @Column(name = "IsSmokingArea") … … 95 95 this.restaurant = restaurant; 96 96 this.capacity = capacity; 97 this. location = location;97 this.tableLocation = location; 98 98 this.isSmokingArea = isSmokingArea; 99 99 this.description = description; -
src/main/java/com/example/rezevirajmasa/demo/model/User.java
r142c0f8 rb67dfd3 21 21 @Id 22 22 @GeneratedValue(strategy = GenerationType.IDENTITY) 23 private Long id;23 private Long userId; 24 24 25 25 @Column(name = "first_name")
Note:
See TracChangeset
for help on using the changeset viewer.