Skip to content

Commit

Permalink
#273 [feat] GUI에 fit한 데이터 형태로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hellozo0 committed Apr 21, 2024
1 parent de022d9 commit 800f59c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

import com.moddy.server.domain.designer.HairShop;
import com.moddy.server.domain.designer.Portfolio;
import com.moddy.server.domain.user.Gender;

import java.util.List;

public record DesignerMyPageResponse(
String profileImgUrl,
String introduction,
String name,
Gender gender,
String gender,
String phoneNumber,
HairShop hairShop,
List<String> dayOffs,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.moddy.server.controller.model.dto.response;

import com.moddy.server.domain.user.Gender;
import java.util.List;

public record ModelMyPageResponse(
String name,
String year,
Gender gender,
String gender,
String phoneNumber,
List<String> preferRegions
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public DesignerMyPageResponse getDesignerInfo(final Long designerId) {
Designer designer = designerJpaRepository.findById(designerId).orElseThrow(() -> new NotFoundException(ErrorCode.DESIGNER_NOT_FOUND_EXCEPTION));
List<String> dayOfWeekList = getDayOfWeekList(designerId);

DesignerMyPageResponse designerMyPageResponse = new DesignerMyPageResponse(designer.getProfileImgUrl(), designer.getIntroduction(),designer.getName(), designer.getGender(), designer.getPhoneNumber(), designer.getHairShop(), dayOfWeekList, designer.getPortfolio(), designer.getKakaoOpenChatUrl());
DesignerMyPageResponse designerMyPageResponse = new DesignerMyPageResponse(designer.getProfileImgUrl(), designer.getIntroduction(),designer.getName(), designer.getGender().getValue(), designer.getSlashedPhoneNumber(designer.getPhoneNumber()), designer.getHairShop(), dayOfWeekList, designer.getPortfolio(), designer.getKakaoOpenChatUrl());
return designerMyPageResponse;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public String getModelName(final Long modelId) {

public ModelMyPageResponse getModelInfo(final Long modelId) {
Model model = modelJpaRepository.findById(modelId).orElseThrow(() -> new NotFoundException(ErrorCode.NOT_FOUND_MODEL_INFO));
ModelMyPageResponse modelMyPageResponse = new ModelMyPageResponse(model.getName(), model.getYear(), model.getGender(),model.getPhoneNumber(), getPreferRegionsList(modelId));
ModelMyPageResponse modelMyPageResponse = new ModelMyPageResponse(model.getName(), model.getYear(), model.getGender().getValue(), model.getSlashedPhoneNumber(model.getPhoneNumber()), getPreferRegionsList(modelId));
return modelMyPageResponse;
}

Expand Down

0 comments on commit 800f59c

Please sign in to comment.