Implemented User Profilepicture | PLEASE check again if implemented right
This commit is contained in:
@@ -59,6 +59,9 @@ public class User {
|
||||
@OneToOne(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
private StatsList statsList;
|
||||
|
||||
@OneToOne(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
private ProfileImageEntity profileImage;
|
||||
|
||||
public User() {}
|
||||
|
||||
// public User(Long id, String publicName, String privateName, String email, String password, VisibilityPrivacy visibilityPrivacy, String friendCode, Set<Trip> trips, Set<Friendship> friendships, Set<RoleName> roles) {
|
||||
@@ -84,6 +87,7 @@ public class User {
|
||||
this.roles = new HashSet<>();
|
||||
this.roles.add(RoleName.USER);
|
||||
this.statsList = new StatsList(this);
|
||||
this.profileImage = new ProfileImageEntity(this, null);
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
@@ -173,4 +177,12 @@ public class User {
|
||||
public StatsList getStats() { return statsList;}
|
||||
|
||||
public void setStats(StatsList statsList) { this.statsList = statsList; }
|
||||
|
||||
public ProfileImageEntity getProfileImage() {
|
||||
return profileImage;
|
||||
}
|
||||
|
||||
public void setProfileImage(ProfileImageEntity profileImage) {
|
||||
this.profileImage = profileImage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user