From 4c628e31adabc0a43314cc93023a1bf3185d0962 Mon Sep 17 00:00:00 2001 From: kseysh Date: Wed, 27 Nov 2024 17:00:41 +0900 Subject: [PATCH] =?UTF-8?q?[modify]=20CrewPart=EB=A5=BC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=ED=95=B4=20joinableParts=EB=A5=BC=20=ED=95=9C?= =?UTF-8?q?=EA=B8=80=EB=A1=9C=20=EB=B0=98=ED=99=98=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95=20(#460)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../meeting/CrewMeetingResponse.java | 2 +- .../sopt/app/application/meeting/CrewPart.java | 18 ++++++++++++++++++ .../application/meeting/MeetingResponse.java | 6 +++++- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 src/main/java/org/sopt/app/application/meeting/CrewPart.java diff --git a/src/main/java/org/sopt/app/application/meeting/CrewMeetingResponse.java b/src/main/java/org/sopt/app/application/meeting/CrewMeetingResponse.java index dbfbef9d..d5c762e8 100644 --- a/src/main/java/org/sopt/app/application/meeting/CrewMeetingResponse.java +++ b/src/main/java/org/sopt/app/application/meeting/CrewMeetingResponse.java @@ -12,7 +12,7 @@ public record CrewMeeting( MeetingStatus status, String imageUrl, String category, - List joinableParts, + List joinableParts, Boolean isBlockedMeeting ){ diff --git a/src/main/java/org/sopt/app/application/meeting/CrewPart.java b/src/main/java/org/sopt/app/application/meeting/CrewPart.java new file mode 100644 index 00000000..a76c9eef --- /dev/null +++ b/src/main/java/org/sopt/app/application/meeting/CrewPart.java @@ -0,0 +1,18 @@ +package org.sopt.app.application.meeting; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@AllArgsConstructor +@Getter +public enum CrewPart { + PM("기획"), + DESIGN("디자인"), + WEB("웹"), + IOS("iOS"), + ANDROID("안드로이드"), + SERVER("서버") + ; + + private final String partName; +} diff --git a/src/main/java/org/sopt/app/application/meeting/MeetingResponse.java b/src/main/java/org/sopt/app/application/meeting/MeetingResponse.java index ea53dc89..45f94f8a 100644 --- a/src/main/java/org/sopt/app/application/meeting/MeetingResponse.java +++ b/src/main/java/org/sopt/app/application/meeting/MeetingResponse.java @@ -22,10 +22,14 @@ public static MeetingResponse of(final CrewMeeting crewMeeting) { .title(crewMeeting.title()) .category(crewMeeting.category()) .canJoinOnlyActiveGeneration(crewMeeting.canJoinOnlyActiveGeneration()) - .joinableParts(crewMeeting.joinableParts()) + .joinableParts(convertToExposedPartName(crewMeeting.joinableParts())) .canJoinAllParts(crewMeeting.joinableParts().size() == Part.values().length) .status(crewMeeting.status()) .imageUrl(crewMeeting.imageUrl()) .build(); } + + private static List convertToExposedPartName(List crewPart) { + return crewPart.stream().map(CrewPart::getPartName).toList(); + } }