package com.example.demo.model; import com.example.demo.model.Client.Client; import com.example.demo.model.Reservation.Reservations; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import java.sql.Date; @Entity @Data @Table(name="payment") @AllArgsConstructor @NoArgsConstructor public class Payment { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer payment_id; private Date payment_date; @ManyToOne @JoinColumn(name="payment_type_id") private PaymentType paymentType; @ManyToOne @JoinColumn(name="user_id") private Client client; @ManyToOne @JoinColumn(name="reservation_id") private Reservations reservations; public Integer getPayment_id() { return payment_id; } public void setPayment_id(Integer payment_id) { this.payment_id = payment_id; } public Date getPayment_date() { return payment_date; } public void setPayment_date(Date payment_date) { this.payment_date = payment_date; } public PaymentType getPaymentType() { return paymentType; } public void setPaymentType(PaymentType paymentType) { this.paymentType = paymentType; } public Client getClient() { return client; } public void setClient(Client client) { this.client = client; } public Reservations getReservations() { return reservations; } public void setReservations(Reservations reservations) { this.reservations = reservations; } }