-
Notifications
You must be signed in to change notification settings - Fork 1
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
17 changed files
with
188 additions
and
165 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
15 changes: 15 additions & 0 deletions
15
...on/src/main/java/org/depromeet/spot/application/block/dto/response/BlockInfoResponse.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,15 @@ | ||
package org.depromeet.spot.application.block.dto.response; | ||
|
||
import java.util.List; | ||
|
||
import org.depromeet.spot.usecase.port.in.block.BlockReadUsecase.BlockInfo; | ||
import org.depromeet.spot.usecase.port.in.block.BlockReadUsecase.RowInfo; | ||
|
||
public record BlockInfoResponse(Long id, String code, List<RowInfoResponse> rowInfo) { | ||
public static BlockInfoResponse from(BlockInfo blockInfo) { | ||
List<RowInfo> rowInfos = blockInfo.getRowInfo(); | ||
List<RowInfoResponse> rowInfoResponses = | ||
rowInfos.stream().map(RowInfoResponse::from).toList(); | ||
return new BlockInfoResponse(blockInfo.getId(), blockInfo.getCode(), rowInfoResponses); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...tion/src/main/java/org/depromeet/spot/application/block/dto/response/RowInfoResponse.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,18 @@ | ||
package org.depromeet.spot.application.block.dto.response; | ||
|
||
import org.depromeet.spot.usecase.port.in.block.BlockReadUsecase.RowInfo; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record RowInfoResponse(Long id, int number, int minSeatNum, int maxSeatNum) { | ||
|
||
public static RowInfoResponse from(RowInfo rowInfo) { | ||
return RowInfoResponse.builder() | ||
.id(rowInfo.getId()) | ||
.number(rowInfo.getNumber()) | ||
.minSeatNum(rowInfo.getMinSeatNum()) | ||
.maxSeatNum(rowInfo.getMaxSeatNum()) | ||
.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
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
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
35 changes: 0 additions & 35 deletions
35
...tructure/jpa/src/main/java/org/depromeet/spot/jpa/seat/repository/SeatRepositoryImpl.java
This file was deleted.
Oops, something went wrong.
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
29 changes: 0 additions & 29 deletions
29
usecase/src/main/java/org/depromeet/spot/usecase/port/in/seat/ReadSeatUsecase.java
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
usecase/src/main/java/org/depromeet/spot/usecase/port/out/block/BlockRepository.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,10 +1,14 @@ | ||
package org.depromeet.spot.usecase.port.out.block; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import org.depromeet.spot.domain.block.Block; | ||
import org.depromeet.spot.domain.block.BlockRow; | ||
|
||
public interface BlockRepository { | ||
|
||
List<Block> findAllBySection(Long sectionId); | ||
|
||
Map<Block, List<BlockRow>> findRowInfosBy(Long sectionId); | ||
} |
12 changes: 0 additions & 12 deletions
12
usecase/src/main/java/org/depromeet/spot/usecase/port/out/seat/SeatRepository.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.