Ignore:
Timestamp:
04/28/25 14:21:17 (3 weeks ago)
Author:
Aleksandar Panovski <apano77@…>
Branches:
main
Children:
e15e8d9
Parents:
f5b256e
Message:

Big change done fully handle_reservation_update() trigger works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/rezevirajmasa/demo/model/Reservation.java

    rf5b256e rdeea3c4  
    11package com.example.rezevirajmasa.demo.model;
    22
     3import com.fasterxml.jackson.annotation.JsonBackReference;
     4import com.fasterxml.jackson.annotation.JsonManagedReference;
    35import jakarta.persistence.*;
    46
     7import java.math.BigDecimal;
    58import java.time.LocalDateTime;
    69import java.time.LocalTime;
     
    1720    @ManyToOne
    1821    @JoinColumn(name = "UserID")
     22    @JsonManagedReference
    1923    private User user;
    2024
    2125    @ManyToOne
    2226    @JoinColumn(name = "TableNumber", nullable = false)
     27    @JsonBackReference
    2328    private TableEntity table;
    2429
     
    3641    private String specialRequests;
    3742
    38     @Column(name = "Status", length = 20, nullable = false, columnDefinition = "VARCHAR default 'Pending'")
     43    @Column(name = "Status", length = 20, nullable = false)
    3944    private String status;
    4045
     
    4651
    4752//    @Column(name = "TotalAmount", precision = 8, scale = 2)
    48 //    private BigDecimal totalAmount;//rezervacija so depozit ako e
     53//    private BigDecimal totalAmount;
    4954
    5055    @Column(name = "PaymentStatus", length = 20, nullable = false, columnDefinition = "VARCHAR default 'Unpaid'")
     
    5560    }
    5661
    57     // Constructors, getters, setters, and other methods...
    58 
    5962    @PrePersist
    6063    private void prePersist() {
    61         // Set default values or perform any pre-persistence logic if needed
    6264        if (status == null) {
    6365            status = "Pending";
Note: See TracChangeset for help on using the changeset viewer.