source: trip-planner/src/main/java/finki/diplomska/tripplanner/models/Images.java

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 
1package finki.diplomska.tripplanner.models;
2
3import com.fasterxml.jackson.annotation.JsonBackReference;
4import lombok.AllArgsConstructor;
5import lombok.Getter;
6import lombok.NoArgsConstructor;
7import lombok.Setter;
8import net.minidev.json.annotate.JsonIgnore;
9
10import javax.persistence.*;
11
12@Entity
13@Table(name = "images")
14@NoArgsConstructor
15@AllArgsConstructor
16@Getter
17@Setter
18public 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.