Ignore:
Timestamp:
09/17/22 01:23:47 (22 months ago)
Author:
Marko <Marko@…>
Branches:
master
Children:
7e88e46
Parents:
e5b84dc
Message:

Added more controllers

File:
1 edited

Legend:

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

    re5b84dc r775e15e  
    11package finki.it.phoneluxbackend.entities;
    22
     3import com.fasterxml.jackson.annotation.JsonIgnore;
    34import finki.it.phoneluxbackend.data.UserRole;
    45import lombok.*;
     
    1516@Getter
    1617@Setter
     18@ToString
    1719@EqualsAndHashCode
    1820@NoArgsConstructor
     
    4850            inverseJoinColumns = @JoinColumn(name = "offer_id")
    4951    )
     52    @JsonIgnore
    5053    private List<PhoneOffer> favouriteOffers = new ArrayList<PhoneOffer>();
    5154
     
    5558        this.email = email;
    5659        this.password = password;
     60        this.userRole = userRole;
     61    }
     62
     63    public User(Long id, String firstName, UserRole userRole) {
     64        this.id = id;
     65        this.firstName = firstName;
     66        this.userRole = userRole;
     67    }
     68
     69    public User(Long id, String firstName, String lastName, String email, UserRole userRole) {
     70        this.id = id;
     71        this.firstName = firstName;
     72        this.lastName = lastName;
     73        this.email = email;
    5774        this.userRole = userRole;
    5875    }
Note: See TracChangeset for help on using the changeset viewer.