Skip to content

Commit

Permalink
added DetailedExternalUser DTO
Browse files Browse the repository at this point in the history
  • Loading branch information
Erling Jahr committed Oct 5, 2023
1 parent 763a79a commit 492dea0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/main/java/no/fintlabs/externalUser/DetailedExternalUser.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package no.fintlabs.externalUser;

import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Builder
public class DetailedExternalUser {
private Long id;
private String fullName;
private String userName;
private String organisationUnitName;
private String mobilePhone;
private String email;
}
11 changes: 11 additions & 0 deletions src/main/java/no/fintlabs/externalUser/ExternalUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ public SimpelExternalUser toSimpleExternalUser() {
.organisationUnitId(mainOrganisationUnitId)
.build();
}

public DetailedExternalUser toDetailedExternalUser(){
return DetailedExternalUser
.builder()
.id(id)
.fullName(firstName +" "+ lastName)
.organisationUnitName(mainOrganisationUnitName)
.mobilePhone(mobilePhone)
.email(email)
.build();
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.util.Optional;
import java.util.function.Consumer;

import static com.ibm.icu.text.PluralRules.Operand.e;

@Service
@Slf4j
Expand Down

0 comments on commit 492dea0

Please sign in to comment.