-
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
12 changed files
with
359 additions
and
60 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
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
5 changes: 5 additions & 0 deletions
5
server/src/main/java/server/haengdong/domain/action/BillActionDetailRepository.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 |
---|---|---|
@@ -1,11 +1,16 @@ | ||
package server.haengdong.domain.action; | ||
|
||
import java.util.List; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
import server.haengdong.domain.event.Event; | ||
|
||
@Repository | ||
public interface BillActionDetailRepository extends JpaRepository<BillActionDetail, Long> { | ||
|
||
List<BillActionDetail> findByBillAction(BillAction billAction); | ||
|
||
void deleteAllByBillAction(BillAction billAction); | ||
|
||
void deleteByBillAction_Action_EventAndBillAction_ActionId(Event event, Long actionId); | ||
} |
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
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
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
Oops, something went wrong.