Changeset 0f5aa27 for src/main/java/com/tourMate/entities/User.java
- Timestamp:
- 02/04/24 16:57:49 (10 months ago)
- Branches:
- master
- Children:
- efaa053
- Parents:
- 07f4e8b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/tourMate/entities/User.java
r07f4e8b r0f5aa27 14 14 import java.util.Collections; 15 15 import java.util.Date; 16 import java.util.List; 16 17 17 18 @Entity … … 27 28 private String name; 28 29 29 @Column(name = "surname", unique = false, nullable = false)30 @Column(name = "surname", unique = false, nullable = true) 30 31 private String surname; 31 32 … … 34 35 private String email; 35 36 36 @Column(name = "password", unique = true, nullable = false)37 @Column(name = "password", unique = true, nullable = true) 37 38 @NotNull 38 39 private String password; 39 40 40 @Column(name = "birth_date", unique = false, nullable = false)41 @Column(name = "birth_date", unique = false, nullable = true) 41 42 @NotNull 42 43 private Date birthDate; 43 44 44 @Column(name = "address", unique = false, nullable = false)45 @Column(name = "address", unique = false, nullable = true) 45 46 private String address; 46 47 47 @Column(name = "contact", unique = false, nullable = false)48 @Column(name = "contact", unique = false, nullable = true) 48 49 private String contact; 49 50 … … 57 58 boolean enabled; 58 59 60 @Column(name = "provider", unique = false, nullable = true) 61 String provider; 62 63 @ManyToMany 64 @JsonIgnore 65 List<User> connectedAccounts; 66 59 67 60 68 public User(@NotNull String name, String surname, @NotNull String email, @NotNull String password, @NotNull Date birthDate, String address, String contact, Role role) { … … 120 128 } 121 129 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 } 122 142 123 143 public void setSurname(String surname) { … … 212 232 this.enabled = enabled; 213 233 } 234 235 public String getProvider() { 236 return provider; 237 } 238 239 public void setProvider(String provider) { 240 this.provider = provider; 241 } 214 242 }
Note:
See TracChangeset
for help on using the changeset viewer.