source: source/MovieZilla-master/src/main/java/com/example/demo/model/Payment.java

Last change on this file was fc7ec52, checked in by darkopopovski <darkopopovski39@…>, 2 years ago

all files

  • Property mode set to 100644
File size: 1.6 KB
Line 
1package com.example.demo.model;
2
3import com.example.demo.model.Client.Client;
4import com.example.demo.model.Reservation.Reservations;
5import lombok.AllArgsConstructor;
6import lombok.Data;
7import lombok.NoArgsConstructor;
8
9import javax.persistence.*;
10import java.sql.Date;
11
12@Entity
13@Data
14@Table(name="payment")
15@AllArgsConstructor
16@NoArgsConstructor
17public 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}
Note: See TracBrowser for help on using the repository browser.