-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
110 additions
and
0 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
22 changes: 22 additions & 0 deletions
22
server/src/main/java/server/haengdong/presentation/response/ActionResponse2.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 server.haengdong.presentation.response; | ||
|
||
import server.haengdong.application.response.ActionAppResponse; | ||
|
||
public record ActionResponse2( | ||
Long actionId, | ||
String name, | ||
Long price, | ||
Long sequence, | ||
String type | ||
) { | ||
|
||
public static ActionResponse2 of(ActionAppResponse actionAppResponse) { | ||
return new ActionResponse2( | ||
actionAppResponse.actionId(), | ||
actionAppResponse.name(), | ||
actionAppResponse.price(), | ||
actionAppResponse.sequence(), | ||
actionAppResponse.actionType().name() | ||
); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
server/src/main/java/server/haengdong/presentation/response/ActionsResponse.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,14 @@ | ||
package server.haengdong.presentation.response; | ||
|
||
import java.util.List; | ||
import server.haengdong.application.response.ActionAppResponse; | ||
|
||
public record ActionsResponse( | ||
List<ActionResponse2> actions | ||
) { | ||
public static ActionsResponse of(List<ActionAppResponse> actions) { | ||
return new ActionsResponse(actions.stream() | ||
.map(ActionResponse2::of) | ||
.toList()); | ||
} | ||
} |
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