Ignore:
Timestamp:
09/07/22 00:51:50 (2 years ago)
Author:
Marko <Marko@…>
Branches:
master
Children:
527b93f
Parents:
dbd4834
Message:

Edited registration and login services

File:
1 edited

Legend:

Unmodified
Added
Removed
  • phonelux-backend/src/main/java/finki/it/phoneluxbackend/entities/User.java

    rdbd4834 rf25d07e  
    88
    99import javax.persistence.*;
     10import java.util.ArrayList;
    1011import java.util.Collection;
    1112import java.util.Collections;
     13import java.util.List;
    1214
    1315@Getter
     
    1618@NoArgsConstructor
    1719@AllArgsConstructor
    18 @Entity(name = "users")
     20@Entity(name = "User")
     21@Table(name = "users")
    1922public class User implements UserDetails {
    2023
     
    3841    private Boolean locked = false;
    3942    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>();
    4051
    4152    public User(String firstName, String lastName, String email, String password, UserRole userRole) {
Note: See TracChangeset for help on using the changeset viewer.