-
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
1 parent
f44b0f4
commit 943753e
Showing
11 changed files
with
184 additions
and
27 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
6 changes: 6 additions & 0 deletions
6
backend/bang-ggood/src/main/java/com/bang_ggood/checklist/dto/CategoryScoreReadResponse.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,6 @@ | ||
package com.bang_ggood.checklist.dto; | ||
|
||
public record CategoryScoreReadResponse( | ||
Integer categoryId, String categoryName, Integer score | ||
) { | ||
} |
29 changes: 29 additions & 0 deletions
29
...ang-ggood/src/main/java/com/bang_ggood/checklist/dto/ChecklistComparisonReadResponse.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,29 @@ | ||
package com.bang_ggood.checklist.dto; | ||
|
||
import com.bang_ggood.checklist.domain.Checklist; | ||
import java.util.List; | ||
|
||
public record ChecklistComparisonReadResponse( | ||
Long checklistId, String roomName, String address, | ||
Integer floor, Integer deposit, Integer rent, | ||
Integer contractTerm, String station, Integer walkingTime, | ||
Integer optionCount, Integer score, | ||
List<CategoryScoreReadResponse> categories | ||
) { | ||
public static ChecklistComparisonReadResponse of(Checklist checklist, int checklistOptionCount, int checklistScore, List<CategoryScoreReadResponse> categoryScores) { | ||
return new ChecklistComparisonReadResponse( | ||
checklist.getId(), | ||
checklist.getRoomName(), | ||
checklist.getRoomAddress(), | ||
checklist.getRoomFloor(), | ||
checklist.getDeposit(), | ||
checklist.getRent(), | ||
checklist.getContractTerm(), | ||
checklist.getRoomStation(), | ||
checklist.getRoomWalkingTime(), | ||
checklistOptionCount, | ||
checklistScore, | ||
categoryScores | ||
); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...ng-ggood/src/main/java/com/bang_ggood/checklist/dto/ChecklistsComparisonReadResponse.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,6 @@ | ||
package com.bang_ggood.checklist.dto; | ||
|
||
import java.util.List; | ||
|
||
public record ChecklistsComparisonReadResponse(List<ChecklistComparisonReadResponse> checklists) { | ||
} |
3 changes: 3 additions & 0 deletions
3
...ng-ggood/src/main/java/com/bang_ggood/checklist/repository/ChecklistOptionRepository.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,7 +1,10 @@ | ||
package com.bang_ggood.checklist.repository; | ||
|
||
import com.bang_ggood.checklist.domain.Checklist; | ||
import com.bang_ggood.checklist.domain.ChecklistOption; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface ChecklistOptionRepository extends JpaRepository<ChecklistOption, Long> { | ||
|
||
Integer countByChecklist(Checklist checklist); | ||
} |
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