[fc7ec52] | 1 | package com.example.demo.model;
|
---|
| 2 |
|
---|
| 3 | import com.example.demo.model.Client.Client;
|
---|
| 4 | import com.example.demo.model.Reservation.Reservations;
|
---|
| 5 | import lombok.AllArgsConstructor;
|
---|
| 6 | import lombok.Data;
|
---|
| 7 | import lombok.NoArgsConstructor;
|
---|
| 8 |
|
---|
| 9 | import javax.persistence.*;
|
---|
| 10 | import java.sql.Date;
|
---|
| 11 |
|
---|
| 12 | @Entity
|
---|
| 13 | @Data
|
---|
| 14 | @Table(name="payment")
|
---|
| 15 | @AllArgsConstructor
|
---|
| 16 | @NoArgsConstructor
|
---|
| 17 | public class Payment {
|
---|
| 18 |
|
---|
| 19 | @Id
|
---|
| 20 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
| 21 | private Integer payment_id;
|
---|
| 22 |
|
---|
| 23 | private Date payment_date;
|
---|
| 24 |
|
---|
| 25 | @ManyToOne
|
---|
| 26 | @JoinColumn(name="payment_type_id")
|
---|
| 27 | private PaymentType paymentType;
|
---|
| 28 |
|
---|
| 29 | @ManyToOne
|
---|
| 30 | @JoinColumn(name="user_id")
|
---|
| 31 | private Client client;
|
---|
| 32 |
|
---|
| 33 | @ManyToOne
|
---|
| 34 | @JoinColumn(name="reservation_id")
|
---|
| 35 | private Reservations reservations;
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | public Integer getPayment_id() {
|
---|
| 39 | return payment_id;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | public void setPayment_id(Integer payment_id) {
|
---|
| 43 | this.payment_id = payment_id;
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | public Date getPayment_date() {
|
---|
| 47 | return payment_date;
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | public void setPayment_date(Date payment_date) {
|
---|
| 51 | this.payment_date = payment_date;
|
---|
| 52 | }
|
---|
| 53 |
|
---|
| 54 | public PaymentType getPaymentType() {
|
---|
| 55 | return paymentType;
|
---|
| 56 | }
|
---|
| 57 |
|
---|
| 58 | public void setPaymentType(PaymentType paymentType) {
|
---|
| 59 | this.paymentType = paymentType;
|
---|
| 60 | }
|
---|
| 61 |
|
---|
| 62 | public Client getClient() {
|
---|
| 63 | return client;
|
---|
| 64 | }
|
---|
| 65 |
|
---|
| 66 | public void setClient(Client client) {
|
---|
| 67 | this.client = client;
|
---|
| 68 | }
|
---|
| 69 |
|
---|
| 70 | public Reservations getReservations() {
|
---|
| 71 | return reservations;
|
---|
| 72 | }
|
---|
| 73 |
|
---|
| 74 | public void setReservations(Reservations reservations) {
|
---|
| 75 | this.reservations = reservations;
|
---|
| 76 | }
|
---|
| 77 | }
|
---|