Line | |
---|
1 | package com.example.moviezone.model;
|
---|
2 |
|
---|
3 |
|
---|
4 | import javax.persistence.*;
|
---|
5 | import lombok.Getter;
|
---|
6 | import lombok.Setter;
|
---|
7 | import lombok.ToString;
|
---|
8 |
|
---|
9 | import java.time.LocalDate;
|
---|
10 | import java.time.LocalDateTime;
|
---|
11 |
|
---|
12 | @Getter
|
---|
13 | @Setter
|
---|
14 | @ToString
|
---|
15 | @Entity
|
---|
16 | @Table(name = "projections")
|
---|
17 | public class Projection {
|
---|
18 | @Id
|
---|
19 | @Column(name = "id_projection", nullable = false)
|
---|
20 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
21 | Integer id_projection;
|
---|
22 |
|
---|
23 | LocalDateTime date_time_start;
|
---|
24 | String type_of_technology;
|
---|
25 | LocalDateTime date_time_end;
|
---|
26 | @ManyToOne
|
---|
27 | @JoinColumn(name = "id_film")
|
---|
28 | Film film;
|
---|
29 | @ManyToOne
|
---|
30 | @JoinColumn(name = "id_event")
|
---|
31 | Event event;
|
---|
32 | @ManyToOne
|
---|
33 | @JoinColumn(name = "id_discount")
|
---|
34 | Discount discount;
|
---|
35 |
|
---|
36 | public Projection(LocalDateTime date_time_start, String type_of_technology, LocalDateTime date_time_end, Film film, Discount discount) {
|
---|
37 | this.date_time_start = date_time_start;
|
---|
38 | this.type_of_technology = type_of_technology;
|
---|
39 | this.date_time_end = date_time_end;
|
---|
40 | this.film = film;
|
---|
41 | this.discount = discount;
|
---|
42 | }
|
---|
43 |
|
---|
44 | public Projection() {
|
---|
45 | }
|
---|
46 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.