add friendCode to userDTOs #15
@@ -23,10 +23,20 @@ public class MaximalUserDTO {
|
||||
private Set<Friendship> friendships;
|
||||
private String base64ProfilePicture;
|
||||
|
||||
public String getFriendCode() {
|
||||
return friendCode;
|
||||
}
|
||||
|
||||
public void setFriendCode(String friendCode) {
|
||||
this.friendCode = friendCode;
|
||||
}
|
||||
|
||||
private String friendCode;
|
||||
|
||||
public MaximalUserDTO() {
|
||||
}
|
||||
|
||||
public MaximalUserDTO(Long id, String publicName, String privateName, String email, VisibilityPrivacy visibilityPrivacy, Set<Trip> trips, Set<Friendship> friendships, String base64ProfilePicture) {
|
||||
public MaximalUserDTO(Long id, String publicName, String privateName, String email, VisibilityPrivacy visibilityPrivacy, Set<Trip> trips, Set<Friendship> friendships, String friendCode,String base64ProfilePicture) {
|
||||
this.id = id;
|
||||
this.publicName = publicName;
|
||||
this.privateName = privateName;
|
||||
@@ -35,6 +45,7 @@ public class MaximalUserDTO {
|
||||
this.trips = trips;
|
||||
this.friendships = friendships;
|
||||
this.base64ProfilePicture = base64ProfilePicture;
|
||||
this.friendCode = friendCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@ public class UserDTO {
|
||||
private String privateName;
|
||||
private String publicName;
|
||||
private Set<RoleName> roles;
|
||||
private String friendCode;
|
||||
|
||||
|
||||
|
||||
public UserDTO(Long userId, String privateName, String publicName, Set<RoleName> roles){
|
||||
public UserDTO(Long userId, String privateName, String publicName, Set<RoleName> roles, String friendCode) {
|
||||
this.userId = userId;
|
||||
this.privateName = privateName;
|
||||
this.publicName = publicName;
|
||||
this.roles = roles;
|
||||
this.friendCode = friendCode;
|
||||
}
|
||||
|
||||
public UserDTO(){}
|
||||
@@ -57,4 +57,13 @@ public class UserDTO {
|
||||
public void setPublicName(String publicName) {
|
||||
this.publicName = publicName;
|
||||
}
|
||||
|
||||
public String getFriendCode() {
|
||||
return friendCode;
|
||||
}
|
||||
|
||||
public void setFriendCode(String friendCode) {
|
||||
this.friendCode = friendCode;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ public interface UserMapper {
|
||||
user.getVisibilityPrivacy(),
|
||||
user.getTrips(),
|
||||
user.getFriendships(),
|
||||
user.getFriendCode(),
|
||||
ImageBase64Util.encode(user.getProfileImage().getImageData())
|
||||
);
|
||||
return maximalUserDTO;
|
||||
|
||||
@@ -67,7 +67,8 @@ public class UserTestFactory {
|
||||
user.getId(),
|
||||
user.getPrivateName(),
|
||||
user.getPublicName(),
|
||||
user.getRoles()
|
||||
user.getRoles(),
|
||||
user.getFriendCode()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user