Ignore:
Timestamp:
02/04/24 16:57:49 (10 months ago)
Author:
darsov2 <62809499+darsov2@…>
Branches:
master
Children:
efaa053
Parents:
07f4e8b
Message:

ouath, mailing impl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/tourMate/entities/User.java

    r07f4e8b r0f5aa27  
    1414import java.util.Collections;
    1515import java.util.Date;
     16import java.util.List;
    1617
    1718@Entity
     
    2728    private String name;
    2829
    29     @Column(name = "surname", unique = false, nullable = false)
     30    @Column(name = "surname", unique = false, nullable = true)
    3031    private String surname;
    3132
     
    3435    private String email;
    3536
    36     @Column(name = "password", unique = true, nullable = false)
     37    @Column(name = "password", unique = true, nullable = true)
    3738    @NotNull
    3839    private String password;
    3940
    40     @Column(name = "birth_date", unique = false, nullable = false)
     41    @Column(name = "birth_date", unique = false, nullable = true)
    4142    @NotNull
    4243    private Date birthDate;
    4344
    44     @Column(name = "address", unique = false, nullable = false)
     45    @Column(name = "address", unique = false, nullable = true)
    4546    private String address;
    4647
    47     @Column(name = "contact", unique = false, nullable = false)
     48    @Column(name = "contact", unique = false, nullable = true)
    4849    private String contact;
    4950
     
    5758    boolean enabled;
    5859
     60    @Column(name = "provider", unique = false, nullable = true)
     61    String provider;
     62
     63    @ManyToMany
     64    @JsonIgnore
     65    List<User> connectedAccounts;
     66
    5967
    6068    public User(@NotNull String name, String surname, @NotNull String email, @NotNull String password, @NotNull Date birthDate, String address, String contact, Role role) {
     
    120128    }
    121129
     130    public List<User> getConnectedAccounts() {
     131        return connectedAccounts;
     132    }
     133
     134    public void setConnectedAccounts(List<User> connectedAccounts) {
     135        this.connectedAccounts = connectedAccounts;
     136    }
     137
     138    public void addConnectedUser(User u)
     139    {
     140        connectedAccounts.add(u);
     141    }
    122142
    123143    public void setSurname(String surname) {
     
    212232        this.enabled = enabled;
    213233    }
     234
     235    public String getProvider() {
     236        return provider;
     237    }
     238
     239    public void setProvider(String  provider) {
     240        this.provider = provider;
     241    }
    214242}
Note: See TracChangeset for help on using the changeset viewer.