Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge: (#783) id 필드 추가 및 name 필드 명 변경 #784

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading