source:
src/main/java/com/example/moviezone/model/Projection.java
Last change on this file was 1e7126f, checked in by , 15 months ago | |
---|---|
|
|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[fc165ab] | 1 | package com.example.moviezone.model; |
2 | ||
3 | ||
[2269653] | 4 | import javax.persistence.*; |
[fc165ab] | 5 | import lombok.Getter; |
6 | import lombok.Setter; | |
7 | import lombok.ToString; | |
8 | ||
9 | import java.time.LocalDate; | |
[1e7126f] | 10 | import java.time.LocalDateTime; |
[fc165ab] | 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) | |
[2c60cda] | 21 | Integer id_projection; |
[fc165ab] | 22 | |
[1e7126f] | 23 | LocalDateTime date_time_start; |
[fc165ab] | 24 | String type_of_technology; |
[1e7126f] | 25 | LocalDateTime date_time_end; |
[fc165ab] | 26 | @ManyToOne |
[eb226b2] | 27 | @JoinColumn(name = "id_film") |
[fc165ab] | 28 | Film film; |
29 | @ManyToOne | |
[eb226b2] | 30 | @JoinColumn(name = "id_event") |
[fc165ab] | 31 | Event event; |
[e68190f] | 32 | @ManyToOne |
[eb226b2] | 33 | @JoinColumn(name = "id_discount") |
[e68190f] | 34 | Discount discount; |
[fc165ab] | 35 | |
[1e7126f] | 36 | public Projection(LocalDateTime date_time_start, String type_of_technology, LocalDateTime date_time_end, Film film, Discount discount) { |
[302b233] | 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; | |
[1e7126f] | 41 | this.discount = discount; |
[302b233] | 42 | } |
[eb5426c] | 43 | |
44 | public Projection() { | |
45 | } | |
[fc165ab] | 46 | } |
Note:
See TracBrowser
for help on using the repository browser.