Last change
on this file since 448bd84 was 302b233, checked in by milamihajlovska <mila.mihajlovska01@…>, 22 months ago |
home controller added mappings for add new film, event and projection
|
-
Property mode
set to
100644
|
File size:
993 bytes
|
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 |
|
---|
11 | @Getter
|
---|
12 | @Setter
|
---|
13 | @ToString
|
---|
14 | @Entity
|
---|
15 | @Table(name = "projections")
|
---|
16 | public class Projection {
|
---|
17 | @Id
|
---|
18 | @Column(name = "id_projection", nullable = false)
|
---|
19 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
20 | Integer id_projection;
|
---|
21 |
|
---|
22 | LocalDate date_time_start;
|
---|
23 | String type_of_technology;
|
---|
24 | LocalDate date_time_end;
|
---|
25 | @ManyToOne
|
---|
26 | @JoinColumn(name = "id_film")
|
---|
27 | Film film;
|
---|
28 | @ManyToOne
|
---|
29 | @JoinColumn(name = "id_event")
|
---|
30 | Event event;
|
---|
31 | @ManyToOne
|
---|
32 | @JoinColumn(name = "id_discount")
|
---|
33 | Discount discount;
|
---|
34 |
|
---|
35 | public Projection(LocalDate date_time_start, String type_of_technology, LocalDate date_time_end, Film film) {
|
---|
36 | this.date_time_start = date_time_start;
|
---|
37 | this.type_of_technology = type_of_technology;
|
---|
38 | this.date_time_end = date_time_end;
|
---|
39 | this.film = film;
|
---|
40 | }
|
---|
41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.