Last change
on this file since 0ba5d1a was 0ba5d1a, checked in by DenicaKj <dkorvezir@…>, 22 months ago |
First part of reservation
|
-
Property mode
set to
100644
|
File size:
931 bytes
|
Line | |
---|
1 | package com.example.moviezone.model;
|
---|
2 |
|
---|
3 | import javax.persistence.*;
|
---|
4 | import lombok.Getter;
|
---|
5 | import lombok.Setter;
|
---|
6 | import lombok.ToString;
|
---|
7 |
|
---|
8 | import java.math.BigInteger;
|
---|
9 | import java.time.LocalDate;
|
---|
10 | import java.time.LocalDateTime;
|
---|
11 |
|
---|
12 | @Entity
|
---|
13 | @Getter
|
---|
14 | @Setter
|
---|
15 | @ToString
|
---|
16 | @Table(name = "tickets")
|
---|
17 | public class Ticket {
|
---|
18 |
|
---|
19 | @Id
|
---|
20 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
21 | int id_ticket;
|
---|
22 |
|
---|
23 | long price;
|
---|
24 | LocalDate date_reserved;
|
---|
25 |
|
---|
26 | @ManyToOne
|
---|
27 | @JoinColumn(name = "id_customer")
|
---|
28 | Customer customer;
|
---|
29 | @ManyToOne
|
---|
30 | @JoinColumn(name = "id_projection")
|
---|
31 | Projection projection;
|
---|
32 | @ManyToOne
|
---|
33 | @JoinColumn(name = "id_discount")
|
---|
34 | Discount discount;
|
---|
35 | @ManyToOne
|
---|
36 | @JoinColumn(name = "id_seat")
|
---|
37 | Seat seat;
|
---|
38 |
|
---|
39 | public Ticket(long price, Customer customer) {
|
---|
40 | this.price = price;
|
---|
41 | this.customer = customer;
|
---|
42 | this.date_reserved=LocalDate.now();
|
---|
43 | }
|
---|
44 |
|
---|
45 | public Ticket() {
|
---|
46 |
|
---|
47 | }
|
---|
48 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.