Skip to content

Commit

Permalink
chore: (#783) id 필드 추가 및 name 필드 명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
zios0707 committed Oct 8, 2024
1 parent 0e43725 commit 53c31c2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class VolunteerApplicationPersistenceAdapter(
groupBy(volunteerJpaEntity.id)
.list(
QQueryCurrentVolunteerApplicantVO(
volunteerJpaEntity.id,
volunteerJpaEntity.name,
volunteerJpaEntity.availableSex,
volunteerJpaEntity.availableGrade,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<UUID>,
maxApplicants: Int,
applicants: List<QueryVolunteerApplicantVO>
) : CurrentVolunteerApplicantVO(
volunteerName = volunteerName,
id = id,
name = name,
availableSex = availableSex,
availableGrade = availableGrade,
currentApplicants = currentApplicants.size,
Expand Down

0 comments on commit 53c31c2

Please sign in to comment.