From fbec866b9aa8bfe60512a9900f3b847baba907ec Mon Sep 17 00:00:00 2001 From: Yoon-Jemin Date: Tue, 20 Feb 2024 00:05:33 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=AF=B8=EC=85=98=EC=97=90=20=EB=A7=A4?= =?UTF-8?q?=EC=9D=BC=20=EC=86=8D=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aromanticcat/umcproject/converter/MissionConverter.java | 1 + src/main/java/aromanticcat/umcproject/entity/Mission.java | 2 ++ .../umcproject/web/dto/Mission/MissionResponseDTO.java | 1 + 3 files changed, 4 insertions(+) diff --git a/src/main/java/aromanticcat/umcproject/converter/MissionConverter.java b/src/main/java/aromanticcat/umcproject/converter/MissionConverter.java index 7ff085a..c0dd471 100644 --- a/src/main/java/aromanticcat/umcproject/converter/MissionConverter.java +++ b/src/main/java/aromanticcat/umcproject/converter/MissionConverter.java @@ -24,6 +24,7 @@ public static MissionResponseDTO.MissionInfoDTO toMissionInfoDTO(Mission mission .missionId(mission.getId()) .name(mission.getName()) .steps(mission.getSteps()) + .everyday(mission.isEveryday()) .stepsCompleted(currentStepsCompleted) .missionStatus(currentMissionStatus) .build(); diff --git a/src/main/java/aromanticcat/umcproject/entity/Mission.java b/src/main/java/aromanticcat/umcproject/entity/Mission.java index 17f96b8..2edd950 100644 --- a/src/main/java/aromanticcat/umcproject/entity/Mission.java +++ b/src/main/java/aromanticcat/umcproject/entity/Mission.java @@ -23,6 +23,8 @@ public class Mission extends BaseEntity { private Integer coin; // 미션 성공 시 보상으로 받을 코인 수 + private boolean everyday; + @OneToMany(mappedBy = "mission", fetch = FetchType.LAZY, cascade = CascadeType.ALL) private List memberMissions = new ArrayList<>(); } diff --git a/src/main/java/aromanticcat/umcproject/web/dto/Mission/MissionResponseDTO.java b/src/main/java/aromanticcat/umcproject/web/dto/Mission/MissionResponseDTO.java index 3351fd6..1ed469a 100644 --- a/src/main/java/aromanticcat/umcproject/web/dto/Mission/MissionResponseDTO.java +++ b/src/main/java/aromanticcat/umcproject/web/dto/Mission/MissionResponseDTO.java @@ -18,6 +18,7 @@ public static class MissionInfoDTO{ Long missionId; // 미션 아이디 String name; // 미션 이름 Integer steps; // 미션의 총 단계 수 + boolean everyday; Integer stepsCompleted; // 한 미션에서 사용자가 완료한 미션의 수 MissionStatus missionStatus; // 미션 완료 여부