-
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
1 parent
bb05e60
commit 1932a13
Showing
7 changed files
with
67 additions
and
65 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
25 changes: 0 additions & 25 deletions
25
back/src/main/kotlin/knu/dong/onedayonebaek/dto/CommitInfo.kt
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
back/src/main/kotlin/knu/dong/onedayonebaek/dto/ProblemDto.kt
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,25 @@ | ||
package knu.dong.onedayonebaek.dto | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema | ||
import knu.dong.onedayonebaek.domain.Problem | ||
import java.time.LocalDate | ||
|
||
data class ProblemDto( | ||
@Schema(description = "문제를 해결한 날짜", nullable = false, example = "2024-05-09") | ||
val solvedDate: LocalDate, | ||
|
||
@Schema(description = "문제 코드가 담긴 커밋 url", nullable = false, example = "https://github.com/gidskql6671") | ||
val commitUrl: String, | ||
|
||
@Schema(description = "사용자명", nullable = false, example = "Kim DongHwan") | ||
val username: String, | ||
|
||
@Schema(description = "문제 제목", nullable = false, example = "아기 상어") | ||
val title: String, | ||
|
||
@Schema(description = "문제 난이도", nullable = false, example = "Gold V") | ||
val rank: String | ||
) | ||
|
||
|
||
fun Problem.toProblemDto() = ProblemDto(solvedDate, commitUrl, user.name, title, problemRank) |
12 changes: 0 additions & 12 deletions
12
back/src/main/kotlin/knu/dong/onedayonebaek/repository/CommitRepository.kt
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
back/src/main/kotlin/knu/dong/onedayonebaek/repository/ProblemRepository.kt
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,12 @@ | ||
package knu.dong.onedayonebaek.repository | ||
|
||
import knu.dong.onedayonebaek.domain.Problem | ||
import knu.dong.onedayonebaek.domain.User | ||
import org.springframework.data.jpa.repository.JpaRepository | ||
import java.time.LocalDate | ||
|
||
|
||
interface ProblemRepository: JpaRepository<Problem, Long> { | ||
fun findAllBySolvedDateBetweenAndUser(start: LocalDate, end: LocalDate, user: User): List<Problem> | ||
fun findAllBySolvedDateAndUser(date: LocalDate, user: User): List<Problem> | ||
} |
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