Last change
on this file was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago |
adding photos
|
-
Property mode
set to
100644
|
File size:
697 bytes
|
Line | |
---|
1 | package finki.diplomska.tripplanner.models;
|
---|
2 |
|
---|
3 | import com.fasterxml.jackson.annotation.JsonBackReference;
|
---|
4 | import lombok.AllArgsConstructor;
|
---|
5 | import lombok.Getter;
|
---|
6 | import lombok.NoArgsConstructor;
|
---|
7 | import lombok.Setter;
|
---|
8 | import net.minidev.json.annotate.JsonIgnore;
|
---|
9 |
|
---|
10 | import javax.persistence.*;
|
---|
11 |
|
---|
12 | @Entity
|
---|
13 | @Table(name = "images")
|
---|
14 | @NoArgsConstructor
|
---|
15 | @AllArgsConstructor
|
---|
16 | @Getter
|
---|
17 | @Setter
|
---|
18 | public class Images {
|
---|
19 |
|
---|
20 | @Id
|
---|
21 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
22 | @Column(name = "id_image")
|
---|
23 | private Long id;
|
---|
24 |
|
---|
25 | @Lob
|
---|
26 | @JsonIgnore
|
---|
27 | private byte[] content;
|
---|
28 |
|
---|
29 | @ManyToOne
|
---|
30 | @JsonBackReference
|
---|
31 | @JoinColumn(name = "id_location", nullable = true)
|
---|
32 | private Location location;
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.