Ignore:
Timestamp:
05/02/25 00:37:10 (2 weeks ago)
Author:
Aleksandar Panovski <apano77@…>
Branches:
main
Children:
c44c5ed
Parents:
e15e8d9
Message:

Added menu tag

succesfull testing and implemnation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/rezevirajmasa/demo/dto/ReservationDTO.java

    re15e8d9 r2518b3a  
    11package com.example.rezevirajmasa.demo.dto;
    22
     3import com.example.rezevirajmasa.demo.model.PreorderedItem;
    34import com.example.rezevirajmasa.demo.model.Reservation;
    45import com.example.rezevirajmasa.demo.model.Restaurant;
     
    1516    private LocalDateTime reservationDateTime;
    1617    private LocalDateTime checkInTime;
    17     private Restaurant restaurant;
     18    private Long restaurantId;
    1819    private int partySize;
    1920    private String status;
    2021    private String specialRequests;
    2122    private String paymentStatus;
    22     private List<String> preOrderedItems;
    23 
     23    private List<PreorderedItem> preOrderedItems;
    2424
    2525    public ReservationDTO() {
    2626    }
    2727
    28     public ReservationDTO(Long reservationID, String userEmail, BigDecimal rating, Long tableNumber, LocalDateTime reservationDateTime, LocalDateTime checkInTime, Restaurant restaurant, int partySize, String status, String specialRequests, String paymentStatus, List<String> preOrderedItems) {
     28    public ReservationDTO(Long reservationID, String userEmail, BigDecimal rating, Long tableNumber, LocalDateTime reservationDateTime, LocalDateTime checkInTime, Long restaurantId, int partySize, String status, String specialRequests, String paymentStatus, List<PreorderedItem> preOrderedItems) {
    2929        this.reservationID = reservationID;
    3030        this.userEmail = userEmail;
     
    3333        this.reservationDateTime = reservationDateTime;
    3434        this.checkInTime = checkInTime;
    35         this.restaurant = restaurant;
     35        this.reservationID = restaurantId;
    3636        this.partySize = partySize;
    3737        this.status = status;
     
    4848        this.reservationDateTime = reservation.getReservationDateTime();
    4949        this.checkInTime = reservation.getCheckInTime();
    50         this.restaurant = reservation.getRestaurant();
     50        this.restaurantId = reservation.getRestaurant().getRestaurantId();
    5151        this.partySize = reservation.getPartySize();
    5252        this.status = reservation.getStatus();
     
    5454        this.paymentStatus = reservation.getPaymentStatus();
    5555        this.preOrderedItems = reservation.getPreOrderedItems();
    56     }
    57 
    58     public List<String> getPreOrderedItems() {
    59         return preOrderedItems;
    60     }
    61 
    62     public void setPreOrderedItems(List<String> preOrderedItems) {
    63         this.preOrderedItems = preOrderedItems;
    6456    }
    6557
     
    112104    }
    113105
    114     public Restaurant getRestaurant() {
    115         return restaurant;
     106    public Long getRestaurantId() {
     107        return restaurantId;
    116108    }
    117109
    118     public void setRestaurant(Restaurant restaurant) {
    119         this.restaurant = restaurant;
     110    public void setRestaurantId(Long restaurantId) {
     111        this.restaurantId = restaurantId;
    120112    }
    121113
     
    151143        this.paymentStatus = paymentStatus;
    152144    }
     145
     146    public List<PreorderedItem> getPreOrderedItems() {
     147        return preOrderedItems;
     148    }
     149
     150    public void setPreOrderedItems(List<PreorderedItem> preOrderedItems) {
     151        this.preOrderedItems = preOrderedItems;
     152    }
    153153}
Note: See TracChangeset for help on using the changeset viewer.