Skip to content

Commit

Permalink
refact: add unreflected fields for getResearcherInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
chock-cho committed Jan 23, 2025
1 parent 7b55f96 commit 6864a32
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ package com.dobby.backend.application.usecase.member
import com.dobby.backend.application.usecase.UseCase
import com.dobby.backend.domain.exception.ResearcherNotFoundException
import com.dobby.backend.domain.gateway.member.ResearcherGateway
import com.dobby.backend.domain.model.member.Member
import com.dobby.backend.presentation.api.dto.response.member.MemberResponse
import io.swagger.v3.oas.annotations.media.Schema

class GetResearcherInfoUseCase(
private val researcherGateway: ResearcherGateway
Expand All @@ -12,7 +15,11 @@ class GetResearcherInfoUseCase(
)

data class Output(
val member : Member,
val univEmail: String,
val univName: String,
val major: String,
val labInfo: String?,
val leadResearcher: String,
)

Expand All @@ -24,7 +31,11 @@ class GetResearcherInfoUseCase(
" " +researcher.labInfo+ " " +researcher.member.name

return Output(
univName =researcher.univName,
member = researcher.member,
univEmail = researcher.univEmail,
univName = researcher.univName,
major = researcher.major,
labInfo = researcher.labInfo,
leadResearcher = leadResearcher
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ data class ResearcherInfoResponse(
val major: String,

@Schema(description = "연구실 정보")
val labInfo: String,
val labInfo: String?,

@Schema(description = "연구 책임")
val leadResearcher: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ object MemberMapper {

fun toResearcherInfoResponse(response: GetResearcherInfoUseCase.Output): ResearcherInfoResponse {
return ResearcherInfoResponse(
leadResearcher = response.leadResearcher,
univName = response.univName
memberInfo = MemberResponse.fromDomain(response.member),
univEmail = response.univEmail,
univName = response.univName,
major = response.major,
labInfo = response.labInfo,
leadResearcher = response.leadResearcher
)
}

Expand Down

0 comments on commit 6864a32

Please sign in to comment.