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
42 changed files
with
214 additions
and
113 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
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
7 changes: 5 additions & 2 deletions
7
...re/src/main/kotlin/team/aliens/dms/domain/volunteer/dto/request/CreateVolunteerRequest.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
6 changes: 4 additions & 2 deletions
6
...re/src/main/kotlin/team/aliens/dms/domain/volunteer/dto/request/UpdateVolunteerRequest.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
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: 4 additions & 4 deletions
8
.../domain/volunteer/model/GradeCondition.kt → .../domain/volunteer/model/AvailableGrade.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,13 +1,13 @@ | ||
package team.aliens.dms.domain.volunteer.model | ||
|
||
enum class GradeCondition( | ||
enum class AvailableGrade( | ||
val grades: Set<Int> | ||
) { | ||
ALL(setOf(1, 2, 3)), | ||
FIRST(setOf(1)), | ||
SECOND(setOf(2)), | ||
THIRD(setOf(3)), | ||
FIRST_SECOND(setOf(1, 2)), | ||
SECOND_THIRD(setOf(2, 3)), | ||
FIRST_THIRD(setOf(1, 3)) | ||
FIRST_AND_SECOND(setOf(1, 2)), | ||
SECOND_AND_THIRD(setOf(2, 3)), | ||
FIRST_AND_THIRD(setOf(1, 3)) | ||
} |
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-core/src/main/kotlin/team/aliens/dms/domain/volunteer/service/CheckVolunteerService.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.volunteer.service | ||
|
||
import java.util.UUID | ||
|
||
interface CheckVolunteerService { | ||
|
||
fun checkVolunteerApplicationExists(studentId: UUID, volunteerId: UUID) | ||
} |
20 changes: 20 additions & 0 deletions
20
...ore/src/main/kotlin/team/aliens/dms/domain/volunteer/service/CheckVolunteerServiceImpl.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.volunteer.service | ||
|
||
import team.aliens.dms.common.annotation.Service | ||
import team.aliens.dms.domain.volunteer.exception.VolunteerApplicationAlreadyExists | ||
import team.aliens.dms.domain.volunteer.spi.QueryVolunteerApplicationPort | ||
import java.util.UUID | ||
|
||
@Service | ||
class CheckVolunteerServiceImpl( | ||
private val queryVolunteerApplicationPort: QueryVolunteerApplicationPort | ||
) : CheckVolunteerService { | ||
|
||
override fun checkVolunteerApplicationExists(studentId: UUID, volunteerId: UUID) { | ||
queryVolunteerApplicationPort | ||
.queryVolunteerApplicationByStudentIdAndVolunteerId(studentId, volunteerId) | ||
?.let { | ||
throw VolunteerApplicationAlreadyExists | ||
} | ||
} | ||
} |
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
3 changes: 3 additions & 0 deletions
3
...e/src/main/kotlin/team/aliens/dms/domain/volunteer/spi/CommandVolunteerApplicationPort.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,10 +1,13 @@ | ||
package team.aliens.dms.domain.volunteer.spi | ||
|
||
import team.aliens.dms.domain.volunteer.model.VolunteerApplication | ||
import java.util.UUID | ||
|
||
interface CommandVolunteerApplicationPort { | ||
|
||
fun saveVolunteerApplication(volunteerApplication: VolunteerApplication): VolunteerApplication | ||
|
||
fun deleteVolunteerApplication(volunteerApplication: VolunteerApplication) | ||
|
||
fun deleteAllVolunteerApplicationsByVolunteerId(volunteerId: UUID) | ||
} |
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.