forked from wine-area/DMS-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
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
251 changed files
with
5,500 additions
and
2,650 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 |
---|---|---|
|
@@ -4,9 +4,10 @@ on: | |
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,10 @@ on: | |
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ name: CD for Dev | |
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
|
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
8 changes: 8 additions & 0 deletions
8
dms-application/src/main/kotlin/team/aliens/dms/common/annotation/SchedulerUseCase.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,8 @@ | ||
package team.aliens.dms.common.annotation | ||
|
||
import org.springframework.transaction.annotation.Transactional | ||
|
||
@Retention(AnnotationRetention.RUNTIME) | ||
@Target(AnnotationTarget.CLASS) | ||
@Transactional | ||
annotation class SchedulerUseCase |
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
dms-application/src/main/kotlin/team/aliens/dms/common/util/FileUtil.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 team.aliens.dms.common.util | ||
|
||
object FileUtil { | ||
|
||
fun isCorrectExtension(extension: String) = | ||
when (extension.lowercase()) { | ||
"jpg", "jpeg", "png", "heic" -> true | ||
else -> false | ||
} | ||
} |
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
dms-application/src/main/kotlin/team/aliens/dms/domain/file/dto/GetFileUploadUrlResponse.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,6 @@ | ||
package team.aliens.dms.domain.file.dto | ||
|
||
data class GetFileUploadUrlResponse( | ||
val fileUploadUrl: String, | ||
val fileUrl: String | ||
) |
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
28 changes: 28 additions & 0 deletions
28
...pplication/src/main/kotlin/team/aliens/dms/domain/file/usecase/GetFileUploadUrlUseCase.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 team.aliens.dms.domain.file.usecase | ||
|
||
import team.aliens.dms.common.annotation.ReadOnlyUseCase | ||
import team.aliens.dms.common.util.FileUtil | ||
import team.aliens.dms.domain.file.dto.GetFileUploadUrlResponse | ||
import team.aliens.dms.domain.file.exception.FileInvalidExtensionException | ||
import team.aliens.dms.domain.file.spi.UploadFilePort | ||
import java.util.UUID | ||
|
||
@ReadOnlyUseCase | ||
class GetFileUploadUrlUseCase( | ||
val filePort: UploadFilePort | ||
) { | ||
fun execute(fileName: String): GetFileUploadUrlResponse { | ||
|
||
val extension = fileName.substring(fileName.lastIndexOf(".").inc()) | ||
if (!FileUtil.isCorrectExtension(extension)) { | ||
throw FileInvalidExtensionException | ||
} | ||
|
||
val fileNameToSave = "${UUID.randomUUID()}||$fileName" | ||
|
||
return GetFileUploadUrlResponse( | ||
fileUploadUrl = filePort.getUploadUrl(fileNameToSave), | ||
fileUrl = filePort.getResourceUrl(fileNameToSave) | ||
) | ||
} | ||
} |
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: 4 additions & 2 deletions
6
...plication/src/main/kotlin/team/aliens/dms/domain/manager/dto/GetStudentDetailsResponse.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
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
11 changes: 0 additions & 11 deletions
11
...ication/src/main/kotlin/team/aliens/dms/domain/manager/spi/ManagerCommandStudyRoomPort.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
11 changes: 1 addition & 10 deletions
11
...plication/src/main/kotlin/team/aliens/dms/domain/manager/spi/ManagerQueryStudyRoomPort.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 |
---|---|---|
@@ -1,12 +1,3 @@ | ||
package team.aliens.dms.domain.manager.spi | ||
|
||
import team.aliens.dms.domain.studyroom.model.Seat | ||
import team.aliens.dms.domain.studyroom.model.StudyRoom | ||
import java.util.UUID | ||
|
||
interface ManagerQueryStudyRoomPort { | ||
|
||
fun querySeatByStudentId(studentId: UUID): Seat? | ||
|
||
fun queryStudyRoomById(studyRoomId: UUID): StudyRoom? | ||
} | ||
interface ManagerQueryStudyRoomPort |
9 changes: 9 additions & 0 deletions
9
dms-application/src/main/kotlin/team/aliens/dms/domain/manager/spi/ManagerQueryTagPort.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,9 @@ | ||
package team.aliens.dms.domain.manager.spi | ||
|
||
import team.aliens.dms.domain.tag.model.Tag | ||
import java.util.UUID | ||
|
||
interface ManagerQueryTagPort { | ||
|
||
fun queryTagsByStudentId(studentId: UUID): List<Tag> | ||
} |
20 changes: 20 additions & 0 deletions
20
dms-application/src/main/kotlin/team/aliens/dms/domain/manager/spi/vo/StudentWithTag.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,20 @@ | ||
package team.aliens.dms.domain.manager.spi.vo | ||
|
||
import team.aliens.dms.domain.student.model.Sex | ||
import team.aliens.dms.domain.student.model.Student | ||
import team.aliens.dms.domain.tag.model.Tag | ||
import java.util.UUID | ||
|
||
data class StudentWithTag( | ||
val id: UUID, | ||
val name: String, | ||
val grade: Int, | ||
val classRoom: Int, | ||
val number: Int, | ||
val roomNumber: String, | ||
val profileImageUrl: String, | ||
val sex: Sex, | ||
val tags: List<Tag> | ||
) { | ||
val gcn: String = Student.processGcn(this.grade, this.classRoom, this.number) | ||
} |
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.