-
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
14 changed files
with
120 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
name: ktlint | ||
name: Ktlint Ci | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
on: [pull_request] | ||
|
||
jobs: | ||
ktlint: | ||
name: Check Code Quality | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
java-version: [ 17 ] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
distribution: 'zulu' | ||
|
||
- name: Clone repo | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v2 | ||
- name: ktlint | ||
uses: ScaCap/action-ktlint@master | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
|
||
- name: Run ktlint | ||
run: | | ||
./gradlew ktlintCheck --daemon --parallel --configure-on-demand | ||
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
reporter: github-pr-check # Change review | ||
fail_on_error: true |
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
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/dsm/pick2024/domain/attendance/port/in/QueryClassAttendanceUseCase.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,10 @@ | ||
package dsm.pick2024.domain.attendance.port.`in` | ||
|
||
import dsm.pick2024.domain.attendance.presentation.dto.response.QueryAttendanceResponse | ||
|
||
interface QueryClassAttendanceUseCase { | ||
fun queryClassAttendance( | ||
grade: Int, | ||
classNum: Int | ||
): List<QueryAttendanceResponse> | ||
} |
5 changes: 0 additions & 5 deletions
5
src/main/kotlin/dsm/pick2024/domain/attendance/port/in/SaveAllAttendanceUseCase.kt
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
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/dsm/pick2024/domain/attendance/port/out/QueryClassAttendancePort.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,10 @@ | ||
package dsm.pick2024.domain.attendance.port.out | ||
|
||
import dsm.pick2024.domain.attendance.domain.Attendance | ||
|
||
interface QueryClassAttendancePort { | ||
fun findByGradeAndClassNum( | ||
grade: Int, | ||
classNum: Int | ||
): List<Attendance> | ||
} |
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
...otlin/dsm/pick2024/domain/attendance/presentation/dto/response/QueryAttendanceResponse.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,15 @@ | ||
package dsm.pick2024.domain.attendance.presentation.dto.response | ||
|
||
import dsm.pick2024.domain.afterschool.enums.Status | ||
import java.util.UUID | ||
|
||
data class QueryAttendanceResponse( | ||
val id: UUID, | ||
val username: String, | ||
val grade: Int, | ||
val classNum: Int, | ||
val num: Int, | ||
val status8: Status, | ||
val status9: Status, | ||
val status10: Status | ||
) |
28 changes: 28 additions & 0 deletions
28
src/main/kotlin/dsm/pick2024/domain/attendance/service/QueryClassAttendanceService.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,28 @@ | ||
package dsm.pick2024.domain.attendance.service | ||
|
||
import dsm.pick2024.domain.attendance.port.`in`.QueryClassAttendanceUseCase | ||
import dsm.pick2024.domain.attendance.port.out.QueryClassAttendancePort | ||
import dsm.pick2024.domain.attendance.presentation.dto.response.QueryAttendanceResponse | ||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
class QueryClassAttendanceService( | ||
private val queryClassAttendancePort: QueryClassAttendancePort | ||
) : QueryClassAttendanceUseCase { | ||
override fun queryClassAttendance( | ||
grade: Int, | ||
classNum: Int | ||
) = queryClassAttendancePort.findByGradeAndClassNum(grade, classNum) | ||
.map { it -> | ||
QueryAttendanceResponse( | ||
id = it.userId, | ||
username = it.name, | ||
grade = it.grade, | ||
classNum = it.classNum, | ||
num = it.num, | ||
status8 = it.period8, | ||
status9 = it.period9, | ||
status10 = it.period10 | ||
) | ||
} | ||
} |
38 changes: 0 additions & 38 deletions
38
...main/kotlin/dsm/pick2024/domain/attendance/service/SaveAllAttendanceSaveAllUserService.kt
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