-
Notifications
You must be signed in to change notification settings - Fork 0
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
[REFACTOR] 데일리 루틴 다중 추가 api 수정
- Loading branch information
Showing
5 changed files
with
69 additions
and
12 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
22 changes: 22 additions & 0 deletions
22
...ie/server/memberroutine/controller/v2/dto/response/MemberDailyRoutinesCreateResponse.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,22 @@ | ||
package com.soptie.server.memberroutine.controller.v2.dto.response; | ||
|
||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
import java.util.List; | ||
|
||
import com.soptie.server.memberroutine.service.dto.response.MemberDailyRoutinesCreateServiceResponse; | ||
|
||
import lombok.Builder; | ||
import lombok.NonNull; | ||
|
||
@Builder(access = PRIVATE) | ||
public record MemberDailyRoutinesCreateResponse( | ||
@NonNull List<Long> ids | ||
) { | ||
|
||
public static MemberDailyRoutinesCreateResponse of(MemberDailyRoutinesCreateServiceResponse response) { | ||
return MemberDailyRoutinesCreateResponse.builder() | ||
.ids(response.ids()) | ||
.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
22 changes: 22 additions & 0 deletions
22
...e/server/memberroutine/service/dto/response/MemberDailyRoutinesCreateServiceResponse.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,22 @@ | ||
package com.soptie.server.memberroutine.service.dto.response; | ||
|
||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
import java.util.List; | ||
|
||
import com.soptie.server.memberroutine.entity.MemberRoutine; | ||
|
||
import lombok.Builder; | ||
import lombok.NonNull; | ||
|
||
@Builder(access = PRIVATE) | ||
public record MemberDailyRoutinesCreateServiceResponse( | ||
@NonNull List<Long> ids | ||
) { | ||
|
||
public static MemberDailyRoutinesCreateServiceResponse of(List<MemberRoutine> memberRoutines) { | ||
return MemberDailyRoutinesCreateServiceResponse.builder() | ||
.ids(memberRoutines.stream().map(MemberRoutine::getId).toList()) | ||
.build(); | ||
} | ||
} |