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

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 627 bytes
Line 
1package finki.diplomska.tripplanner.models;
2
3import com.fasterxml.jackson.annotation.JsonIgnore;
4import lombok.AllArgsConstructor;
5import lombok.Getter;
6import lombok.NoArgsConstructor;
7import lombok.Setter;
8
9import javax.persistence.*;
10import java.util.List;
11
12@Entity
13@Table(name = "companions")
14@NoArgsConstructor
15@AllArgsConstructor
16@Getter
17@Setter
18public class Companion {
19 @Id
20 @GeneratedValue(strategy = GenerationType.IDENTITY)
21 @Column(name = "id_companion")
22 private Long id;
23
24 private String type;
25
26 @ManyToMany(mappedBy = "companionList")
27 @JsonIgnore
28 private List<Location> locationList;
29}
Note: See TracBrowser for help on using the repository browser.