diff --git a/dms-core/src/main/kotlin/team/aliens/dms/domain/volunteer/dto/response/VolunteerResponse.kt b/dms-core/src/main/kotlin/team/aliens/dms/domain/volunteer/dto/response/VolunteerResponse.kt index 33e423e37..42d6696ed 100644 --- a/dms-core/src/main/kotlin/team/aliens/dms/domain/volunteer/dto/response/VolunteerResponse.kt +++ b/dms-core/src/main/kotlin/team/aliens/dms/domain/volunteer/dto/response/VolunteerResponse.kt @@ -99,7 +99,8 @@ data class VolunteerApplicantsResponse( ) data class CurrentVolunteerApplicantResponse( - val volunteerName: String, + val id: UUID, + val name: String, val availableSex: Sex, val availableGrade: AvailableGrade, val currentApplicants: Int, @@ -108,7 +109,8 @@ data class CurrentVolunteerApplicantResponse( ) { companion object { fun of(currentVolunteerApplicant: CurrentVolunteerApplicantVO) = CurrentVolunteerApplicantResponse( - volunteerName = currentVolunteerApplicant.volunteerName, + id = currentVolunteerApplicant.id, + name = currentVolunteerApplicant.name, availableSex = currentVolunteerApplicant.availableSex, availableGrade = currentVolunteerApplicant.availableGrade, currentApplicants = currentVolunteerApplicant.currentApplicants, diff --git a/dms-core/src/main/kotlin/team/aliens/dms/domain/volunteer/spi/vo/CurrentVolunteerApplicantVO.kt b/dms-core/src/main/kotlin/team/aliens/dms/domain/volunteer/spi/vo/CurrentVolunteerApplicantVO.kt index b1719bac8..4ca563b22 100644 --- a/dms-core/src/main/kotlin/team/aliens/dms/domain/volunteer/spi/vo/CurrentVolunteerApplicantVO.kt +++ b/dms-core/src/main/kotlin/team/aliens/dms/domain/volunteer/spi/vo/CurrentVolunteerApplicantVO.kt @@ -2,9 +2,11 @@ package team.aliens.dms.domain.volunteer.spi.vo import team.aliens.dms.domain.student.model.Sex import team.aliens.dms.domain.volunteer.model.AvailableGrade +import java.util.UUID open class CurrentVolunteerApplicantVO( - val volunteerName: String, + val id: UUID, + val name: String, val availableSex: Sex, val availableGrade: AvailableGrade, val currentApplicants: Int, diff --git a/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/volunteer/VolunteerApplicationPersistenceAdapter.kt b/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/volunteer/VolunteerApplicationPersistenceAdapter.kt index fb078066a..7456d2ea6 100644 --- a/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/volunteer/VolunteerApplicationPersistenceAdapter.kt +++ b/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/volunteer/VolunteerApplicationPersistenceAdapter.kt @@ -88,6 +88,7 @@ class VolunteerApplicationPersistenceAdapter( groupBy(volunteerJpaEntity.id) .list( QQueryCurrentVolunteerApplicantVO( + volunteerJpaEntity.id, volunteerJpaEntity.name, volunteerJpaEntity.availableSex, volunteerJpaEntity.availableGrade, diff --git a/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/volunteer/repository/vo/QueryCurrentVolunteerApplicantVO.kt b/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/volunteer/repository/vo/QueryCurrentVolunteerApplicantVO.kt index 56a92dbdf..bc723681e 100644 --- a/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/volunteer/repository/vo/QueryCurrentVolunteerApplicantVO.kt +++ b/dms-persistence/src/main/kotlin/team/aliens/dms/persistence/volunteer/repository/vo/QueryCurrentVolunteerApplicantVO.kt @@ -7,14 +7,16 @@ import team.aliens.dms.domain.volunteer.spi.vo.CurrentVolunteerApplicantVO import java.util.UUID class QueryCurrentVolunteerApplicantVO @QueryProjection constructor( - volunteerName: String, + id: UUID, + name: String, availableSex: Sex, availableGrade: AvailableGrade, currentApplicants: List, maxApplicants: Int, applicants: List ) : CurrentVolunteerApplicantVO( - volunteerName = volunteerName, + id = id, + name = name, availableSex = availableSex, availableGrade = availableGrade, currentApplicants = currentApplicants.size,