-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
8 changed files
with
209 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 17 additions & 10 deletions
27
...java/gg/agenda/api/user/agendaprofile/controller/response/AgendaProfileDetailsResDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,53 @@ | ||
package gg.agenda.api.user.agendaprofile.controller.response; | ||
|
||
import java.net.URL; | ||
import java.util.List; | ||
|
||
import org.mapstruct.Mapper; | ||
|
||
import gg.agenda.api.user.agendaprofile.service.intraprofile.IntraAchievement; | ||
import gg.agenda.api.user.agendaprofile.service.intraprofile.IntraProfile; | ||
import gg.data.agenda.AgendaProfile; | ||
import gg.data.agenda.type.Coalition; | ||
import gg.data.agenda.type.Location; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class AgendaProfileDetailsResDto { | ||
|
||
private String userIntraId; | ||
private String userContent; | ||
private String userGithub; | ||
private Coalition userCoalition; | ||
private Location userLocation; | ||
private int ticketCount; | ||
private IntraProfile intraProfile; | ||
private URL imageUrl; | ||
private List<IntraAchievement> achievements; | ||
|
||
@Builder | ||
public AgendaProfileDetailsResDto(String userIntraId, String userContent, String userGithub, | ||
Coalition userCoalition, Location userLocation, int ticketCount, IntraProfile intraProfile) { | ||
Coalition userCoalition, Location userLocation, URL imageUrl, | ||
List<IntraAchievement> achievements) { | ||
this.userIntraId = userIntraId; | ||
this.userContent = userContent; | ||
this.userGithub = userGithub; | ||
this.userCoalition = userCoalition; | ||
this.userLocation = userLocation; | ||
this.ticketCount = ticketCount; | ||
this.intraProfile = intraProfile; | ||
this.imageUrl = imageUrl; | ||
this.achievements = achievements; | ||
} | ||
|
||
public static AgendaProfileDetailsResDto toDto(AgendaProfile profile, int ticketCount, IntraProfile intraProfile) { | ||
public static AgendaProfileDetailsResDto toDto(AgendaProfile profile, IntraProfile intraProfile) { | ||
return AgendaProfileDetailsResDto.builder() | ||
.userIntraId(profile.getIntraId()) | ||
.userContent(profile.getContent()) | ||
.userGithub(profile.getGithubUrl()) | ||
.userCoalition(profile.getCoalition()) | ||
.userLocation(profile.getLocation()) | ||
.ticketCount(ticketCount) | ||
.intraProfile(intraProfile) | ||
.imageUrl(intraProfile.getImageUrl()) | ||
.achievements(intraProfile.getAchievements()) | ||
.build(); | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
...va/gg/agenda/api/user/agendaprofile/controller/response/MyAgendaProfileDetailsResDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package gg.agenda.api.user.agendaprofile.controller.response; | ||
|
||
import java.net.URL; | ||
import java.util.List; | ||
|
||
import gg.agenda.api.user.agendaprofile.service.intraprofile.IntraAchievement; | ||
import gg.agenda.api.user.agendaprofile.service.intraprofile.IntraProfile; | ||
import gg.data.agenda.AgendaProfile; | ||
import gg.data.agenda.type.Coalition; | ||
import gg.data.agenda.type.Location; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) | ||
public class MyAgendaProfileDetailsResDto { | ||
|
||
private String userIntraId; | ||
private String userContent; | ||
private String userGithub; | ||
private Coalition userCoalition; | ||
private Location userLocation; | ||
private int ticketCount; | ||
private URL imageUrl; | ||
private List<IntraAchievement> achievements; | ||
|
||
@Builder | ||
public MyAgendaProfileDetailsResDto(String userIntraId, String userContent, String userGithub, | ||
Coalition userCoalition, Location userLocation, int ticketCount, URL imageUrl, | ||
List<IntraAchievement> achievements) { | ||
this.userIntraId = userIntraId; | ||
this.userContent = userContent; | ||
this.userGithub = userGithub; | ||
this.userCoalition = userCoalition; | ||
this.userLocation = userLocation; | ||
this.ticketCount = ticketCount; | ||
this.imageUrl = imageUrl; | ||
this.achievements = achievements; | ||
} | ||
|
||
public static MyAgendaProfileDetailsResDto toDto(AgendaProfile profile, int ticketCount, | ||
IntraProfile intraProfile) { | ||
return MyAgendaProfileDetailsResDto.builder() | ||
.userIntraId(profile.getIntraId()) | ||
.userContent(profile.getContent()) | ||
.userGithub(profile.getGithubUrl()) | ||
.userCoalition(profile.getCoalition()) | ||
.userLocation(profile.getLocation()) | ||
.ticketCount(ticketCount) | ||
.imageUrl(intraProfile.getImageUrl()) | ||
.achievements(intraProfile.getAchievements()) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.