Ignore:
Timestamp:
05/06/25 00:44:02 (13 days ago)
Author:
Aleksandar Panovski <apano77@…>
Branches:
main
Children:
e48199a
Parents:
142c0f8
Message:

Normalization needed to continue, till here done

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  
    2626    private String itemName;
    2727
    28     @Column(name = "category", length = 50)
    29     private String category;
     28    @Column(name = "menuCategory", length = 50)
     29    private String menuCategory;
    3030
    3131    @Column(name = "price", precision = 8, scale = 2)
     
    4545        this.restaurant = restaurant;
    4646        this.itemName = itemName;
    47         this.category = category;
     47        this.menuCategory = category;
    4848        this.price = price;
    4949        this.description = description;
  • src/main/java/com/example/rezevirajmasa/demo/model/MenuTag.java

    r142c0f8 rb67dfd3  
    1111    @Id
    1212    @GeneratedValue(strategy = GenerationType.IDENTITY)
    13     private Long id;
     13    private Long menuTagId;
    1414
    1515    @ManyToOne(fetch = FetchType.LAZY)
  • src/main/java/com/example/rezevirajmasa/demo/model/PreorderedItem.java

    r142c0f8 rb67dfd3  
    2020    @Id
    2121    @GeneratedValue(strategy = GenerationType.IDENTITY)
    22     private Long id;
     22    private Long preorderedItemId;
    2323
    24     private String name;
     24    private String preorderedItemName;
    2525
    2626    private Integer quantity;
  • src/main/java/com/example/rezevirajmasa/demo/model/Reservation.java

    r142c0f8 rb67dfd3  
    4848
    4949    @Column(name = "Status", length = 20, nullable = false)
    50     private String status;
     50    private String reservationStatus;
    5151
    5252    @Column(name = "CheckInTime")
     
    5757    private LocalDateTime checkOutTime;
    5858
    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)
    6460    private List<PreorderedItem> preOrderedItems = new ArrayList<>();
    6561
     
    7369    @PrePersist
    7470    private void prePersist() {
    75         if (status == null) {
    76             status = "Pending";
     71        if (reservationStatus == null) {
     72            reservationStatus = "Pending";
    7773        }
    7874        if (paymentStatus == null) {
     
    8884        this.partySize = partySize;
    8985        this.specialRequests = specialRequests;
    90         this.status = status;
     86        this.reservationStatus = status;
    9187        this.checkInTime = checkInTime;
    9288        this.checkOutTime = checkOutTime;
     
    105101                ", partySize=" + partySize +
    106102                ", specialRequests='" + specialRequests + '\'' +
    107                 ", status='" + status + '\'' +
     103                ", status='" + reservationStatus + '\'' +
    108104                ", checkInTime=" + checkInTime +
    109105                ", checkOutTime=" + checkOutTime +
  • src/main/java/com/example/rezevirajmasa/demo/model/Restaurant.java

    r142c0f8 rb67dfd3  
    146146        @Id
    147147        @GeneratedValue(strategy = GenerationType.IDENTITY)
    148         private Long id;
     148        private Long reservationHistoryId;
    149149
    150150        @ManyToOne
     
    170170
    171171        @Column(name = "status")
    172         private String status;
     172        private String reservationStatus;
    173173
    174174        @Column(name = "cancellation_reason")
     
    185185            this.partySize = partySize;
    186186            this.specialRequests = specialRequests;
    187             this.status = status;
     187            this.reservationStatus = status;
    188188            this.cancellationReason = cancellationReason;
    189189            this.checkInDate = checkInDate;
     
    194194
    195195        public Long getId() {
    196             return id;
     196            return reservationHistoryId;
    197197        }
    198198
    199199        public void setId(Long id) {
    200             this.id = id;
     200            this.reservationHistoryId = id;
    201201        }
    202202
     
    242242
    243243        public String getStatus() {
    244             return status;
     244            return reservationStatus;
    245245        }
    246246
    247247        public void setStatus(String status) {
    248             this.status = status;
     248            this.reservationStatus = status;
    249249        }
    250250
     
    276276        public String toString() {
    277277            return "ReservationHistory{" +
    278                     "id=" + id +
     278                    "id=" + reservationHistoryId +
    279279                    ", user=" + user +
    280280                    ", table=" + table +
     
    283283                    ", partySize=" + partySize +
    284284                    ", specialRequests='" + specialRequests + '\'' +
    285                     ", status='" + status + '\'' +
     285                    ", status='" + reservationStatus + '\'' +
    286286                    ", cancellationReason='" + cancellationReason + '\'' +
    287287                    ", checkInDate=" + checkInDate +
  • src/main/java/com/example/rezevirajmasa/demo/model/TableEntity.java

    r142c0f8 rb67dfd3  
    3636    private int capacity;
    3737
    38     @Column(name = "Location")
    39     private String location;
     38    @Column(name = "tableLocation")
     39    private String tableLocation;
    4040
    4141    @Column(name = "IsSmokingArea")
     
    9595        this.restaurant = restaurant;
    9696        this.capacity = capacity;
    97         this.location = location;
     97        this.tableLocation = location;
    9898        this.isSmokingArea = isSmokingArea;
    9999        this.description = description;
  • src/main/java/com/example/rezevirajmasa/demo/model/User.java

    r142c0f8 rb67dfd3  
    2121    @Id
    2222    @GeneratedValue(strategy = GenerationType.IDENTITY)
    23     private Long id;
     23    private Long userId;
    2424
    2525    @Column(name = "first_name")
Note: See TracChangeset for help on using the changeset viewer.