source: source/MovieZilla-master/src/main/java/com/example/demo/model/Reservation/Reservations.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: 2.5 KB
Line 
1package com.example.demo.model.Reservation;
2
3
4import com.example.demo.model.Client.Client;
5import com.example.demo.model.MovieProjection;
6import com.example.demo.model.PaymentType;
7import com.example.demo.model.Seat.Seat;
8import lombok.Data;
9
10import javax.persistence.*;
11import java.sql.Date;
12import java.time.LocalDateTime;
13
14@Entity
15@Data
16@Table(name="reservation")
17public class Reservations {
18
19 @Id
20 public Integer reservation_id;
21
22 public LocalDateTime reservation_date;
23
24
25 @ManyToOne
26 @JoinColumn(name="payment_type_id")
27 public PaymentType paymentType;
28
29 @ManyToOne
30 @JoinColumn(name="seat_id", referencedColumnName = "seat_id")
31 @JoinColumn(name="auditorium_id", referencedColumnName = "auditorium_id")
32 public Seat seat;
33
34 @ManyToOne
35 @JoinColumn(name="user_id")
36 public Client client;
37
38 @ManyToOne
39 @JoinColumn(name="projection_id")
40 public MovieProjection movieProjection;
41
42
43
44 /*
45 @Embedded
46 public ReservationCombo reservationCombo;
47
48
49 */
50
51 public Reservations(Integer reservation_id, LocalDateTime reservation_date, PaymentType paymentType, Seat seat, Client client, MovieProjection movieProjection) {
52 this.reservation_id = reservation_id;
53 this.reservation_date = reservation_date;
54 this.paymentType = paymentType;
55 this.seat = seat;
56 this.client = client;
57 this.movieProjection = movieProjection;
58 }
59
60 public Reservations() {
61 }
62
63 public Integer getReservation_id() {
64 return reservation_id;
65 }
66
67 public void setReservation_id(Integer reservation_id) {
68 this.reservation_id = reservation_id;
69 }
70
71 public LocalDateTime getReservation_date() {
72 return reservation_date;
73 }
74
75 public void setReservation_date(LocalDateTime reservation_date) {
76 this.reservation_date = reservation_date;
77 }
78
79 public PaymentType getPaymentType() {
80 return paymentType;
81 }
82
83 public void setPaymentType(PaymentType paymentType) {
84 this.paymentType = paymentType;
85 }
86
87 public Seat getSeat() {
88 return seat;
89 }
90
91 public void setSeat(Seat seat) {
92 this.seat = seat;
93 }
94
95 public Client getClient() {
96 return client;
97 }
98
99 public void setClient(Client client) {
100 this.client = client;
101 }
102
103 public MovieProjection getMovieProjection() {
104 return movieProjection;
105 }
106
107 public void setMovieProjection(MovieProjection movieProjection) {
108 this.movieProjection = movieProjection;
109 }
110}
111
Note: See TracBrowser for help on using the repository browser.