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
39 changed files
with
509 additions
and
55 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 +1 @@ | ||
* @softpeanut @jeongyoon05 @rlaisqls @tedsoftj1123 @alsdl0629 @ilyoil2 | ||
* @softpeanut @jeongyoon05 @rlaisqls @tedsoftj1123 @alsdl0629 @ilyoil2 @4mjeo @zios0707 |
7 changes: 7 additions & 0 deletions
7
dms-core/src/main/kotlin/team/aliens/dms/domain/bug/dto/CreateBugReportRequest.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,7 @@ | ||
package team.aliens.dms.domain.bug.dto | ||
|
||
data class CreateBugReportRequest( | ||
val content: String, | ||
val developmentArea: String, | ||
val attachmentUrls: List<String>? | ||
) |
5 changes: 5 additions & 0 deletions
5
dms-core/src/main/kotlin/team/aliens/dms/domain/bug/model/BugAttachment.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,5 @@ | ||
package team.aliens.dms.domain.bug.model | ||
|
||
data class BugAttachment( | ||
val attachmentUrls: List<String>? | ||
) |
21 changes: 21 additions & 0 deletions
21
dms-core/src/main/kotlin/team/aliens/dms/domain/bug/model/BugReport.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,21 @@ | ||
package team.aliens.dms.domain.bug.model | ||
|
||
import team.aliens.dms.common.annotation.Aggregate | ||
import java.time.LocalDateTime | ||
import java.util.UUID | ||
|
||
@Aggregate | ||
data class BugReport( | ||
|
||
val id: UUID = UUID(0, 0), | ||
|
||
val studentId: UUID, | ||
|
||
val content: String, | ||
|
||
val developmentArea: DevelopmentArea, | ||
|
||
val createdAt: LocalDateTime?, | ||
|
||
val attachmentUrls: BugAttachment? | ||
) |
6 changes: 6 additions & 0 deletions
6
dms-core/src/main/kotlin/team/aliens/dms/domain/bug/model/DevelopmentArea.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.bug.model | ||
|
||
enum class DevelopmentArea { | ||
IOS, | ||
ANDROID | ||
} |
8 changes: 8 additions & 0 deletions
8
dms-core/src/main/kotlin/team/aliens/dms/domain/bug/service/BugService.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.domain.bug.service | ||
|
||
import team.aliens.dms.common.annotation.Service | ||
|
||
@Service | ||
class BugService( | ||
commandBugService: CommandBugService | ||
) : CommandBugService by commandBugService |
8 changes: 8 additions & 0 deletions
8
dms-core/src/main/kotlin/team/aliens/dms/domain/bug/service/CommandBugService.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.domain.bug.service | ||
|
||
import team.aliens.dms.domain.bug.model.BugReport | ||
|
||
interface CommandBugService { | ||
|
||
fun saveBugReport(bugReport: BugReport): BugReport | ||
} |
14 changes: 14 additions & 0 deletions
14
dms-core/src/main/kotlin/team/aliens/dms/domain/bug/service/CommandBugServiceImpl.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,14 @@ | ||
package team.aliens.dms.domain.bug.service | ||
|
||
import team.aliens.dms.common.annotation.Service | ||
import team.aliens.dms.domain.bug.model.BugReport | ||
import team.aliens.dms.domain.bug.spi.CommandBugPort | ||
|
||
@Service | ||
class CommandBugServiceImpl( | ||
private val commandBugPort: CommandBugPort, | ||
) : CommandBugService { | ||
|
||
override fun saveBugReport(bugReport: BugReport) = | ||
commandBugPort.saveBugReport(bugReport) | ||
} |
4 changes: 4 additions & 0 deletions
4
dms-core/src/main/kotlin/team/aliens/dms/domain/bug/spi/BugPort.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,4 @@ | ||
package team.aliens.dms.domain.bug.spi | ||
|
||
interface BugPort : | ||
CommandBugPort |
8 changes: 8 additions & 0 deletions
8
dms-core/src/main/kotlin/team/aliens/dms/domain/bug/spi/CommandBugPort.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.domain.bug.spi | ||
|
||
import team.aliens.dms.domain.bug.model.BugReport | ||
|
||
interface CommandBugPort { | ||
|
||
fun saveBugReport(bugReport: BugReport): BugReport | ||
} |
33 changes: 33 additions & 0 deletions
33
dms-core/src/main/kotlin/team/aliens/dms/domain/bug/usecase/CreateBugReportUseCase.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,33 @@ | ||
package team.aliens.dms.domain.bug.usecase | ||
|
||
import team.aliens.dms.common.annotation.UseCase | ||
import team.aliens.dms.domain.bug.dto.CreateBugReportRequest | ||
import team.aliens.dms.domain.bug.model.BugAttachment | ||
import team.aliens.dms.domain.bug.model.BugReport | ||
import team.aliens.dms.domain.bug.model.DevelopmentArea | ||
import team.aliens.dms.domain.bug.service.BugService | ||
import team.aliens.dms.domain.student.service.StudentService | ||
import java.time.LocalDateTime | ||
|
||
@UseCase | ||
class CreateBugReportUseCase( | ||
private val bugService: BugService, | ||
private val studentService: StudentService | ||
) { | ||
|
||
fun execute(request: CreateBugReportRequest) { | ||
val student = studentService.getCurrentStudent() | ||
|
||
val attachmentUrls = request.attachmentUrls ?: emptyList() | ||
|
||
bugService.saveBugReport( | ||
BugReport( | ||
studentId = student.id, | ||
content = request.content, | ||
developmentArea = DevelopmentArea.valueOf(request.developmentArea), | ||
createdAt = LocalDateTime.now(), | ||
attachmentUrls = BugAttachment(attachmentUrls) | ||
) | ||
) | ||
} | ||
} |
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
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
5 changes: 5 additions & 0 deletions
5
dms-core/src/main/kotlin/team/aliens/dms/domain/tag/spi/QueryStudentTagPort.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,9 +1,14 @@ | ||
package team.aliens.dms.domain.tag.spi | ||
|
||
import team.aliens.dms.domain.tag.model.StudentTag | ||
import team.aliens.dms.domain.tag.spi.vo.StudentTagDetailVO | ||
import java.util.UUID | ||
|
||
interface QueryStudentTagPort { | ||
|
||
fun queryStudentTagsByTagNameIn(names: List<String>): List<StudentTag> | ||
|
||
fun queryStudentTagsByStudentId(studentId: UUID): List<StudentTag> | ||
|
||
fun queryAllStudentTagDetails(): List<StudentTagDetailVO> | ||
} |
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: 11 additions & 0 deletions
11
dms-core/src/main/kotlin/team/aliens/dms/domain/tag/spi/vo/StudentTagDetailVO.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,11 @@ | ||
package team.aliens.dms.domain.tag.spi.vo | ||
|
||
import java.util.UUID | ||
|
||
open class StudentTagDetailVO( | ||
val studentId: UUID, | ||
val studentName: String, | ||
val tagId: UUID, | ||
val tagColor: String, | ||
val tagName: String | ||
) |
Oops, something went wrong.