- Timestamp:
- 09/07/22 00:51:50 (2 years ago)
- Branches:
- master
- Children:
- 527b93f
- Parents:
- dbd4834
- Location:
- phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/ConfirmationToken.java
rdbd4834 rf25d07e 13 13 @Setter 14 14 @NoArgsConstructor 15 @Entity(name = "confirmation_tokens") 15 @Entity(name = "ConfirmationToken") 16 @Table(name = "confirmation_tokens") 16 17 public class ConfirmationToken { 17 18 -
phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/Phone.java
rdbd4834 rf25d07e 28 28 private String image_url; 29 29 30 @Column(name = "total_offers") 31 private Integer total_offers; 32 33 @Column(name = "lowest_price") 34 private Integer lowestPrice; 35 30 36 @OneToMany(fetch = FetchType.LAZY, mappedBy = "phone") 31 37 @JsonIgnore -
phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/PhoneOffer.java
rdbd4834 rf25d07e 5 5 6 6 import javax.persistence.*; 7 import java.util.ArrayList; 7 8 import java.util.Date; 9 import java.util.List; 8 10 9 11 @AllArgsConstructor … … 73 75 private String offer_shop_code; 74 76 77 @ManyToMany(mappedBy = "favouriteOffers") 78 private List<User> users = new ArrayList<User>(); 79 75 80 @ManyToOne(fetch = FetchType.LAZY) 76 81 @JoinColumn(name = "phone_id", referencedColumnName = "id") -
phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/User.java
rdbd4834 rf25d07e 8 8 9 9 import javax.persistence.*; 10 import java.util.ArrayList; 10 11 import java.util.Collection; 11 12 import java.util.Collections; 13 import java.util.List; 12 14 13 15 @Getter … … 16 18 @NoArgsConstructor 17 19 @AllArgsConstructor 18 @Entity(name = "users") 20 @Entity(name = "User") 21 @Table(name = "users") 19 22 public class User implements UserDetails { 20 23 … … 38 41 private Boolean locked = false; 39 42 private Boolean enabled = false; 43 44 @ManyToMany 45 @JoinTable( 46 name = "users_favourite_offers", 47 joinColumns = @JoinColumn(name = "user_id"), 48 inverseJoinColumns = @JoinColumn(name = "offer_id") 49 ) 50 private List<PhoneOffer> favouriteOffers = new ArrayList<PhoneOffer>(); 40 51 41 52 public User(String firstName, String lastName, String email, String password, UserRole userRole) {
Note:
See TracChangeset
for help on using the changeset viewer.