-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 어르신 일괄 등록 API 연동 #134 #138
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5759a1e
Feat: 어르신 일괄 등록 관련 Dto 추가
ProtossManse bc4b60c
Feat: #134 ElderRegisterService 일괄 등록 API 추가
ProtossManse 3c25ff7
Feat: #134 Repository, RepositoryImpl 구현
ProtossManse 1aa23e9
Feat: #134 viewmodel, screen 어르신 일괄 등록 연동
ProtossManse aa6e253
Feat: 어르신 건강정보 일괄등록 구현
ProtossManse be2cab0
Merge branch 'refactor/onboarding-state-#115' of https://github.com/M…
ProtossManse 9970b36
Feat: #134 ElderChip 컴포넌트 modifier 인자 추가
ProtossManse 6ba9bee
Chore: ElderRegisterService 경로 이동 및 import 변경
ProtossManse f47ad4d
Merge branch 'develop' into feat/elder-api-bulk-#134
ProtossManse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
30 changes: 30 additions & 0 deletions
30
app/src/main/java/com/konkuk/medicarecall/data/dto/request/ElderBulkHealthInfoRequestDto.kt
This file contains hidden or 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,30 @@ | ||
| package com.konkuk.medicarecall.data.dto.request | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class ElderBulkHealthInfoRequestDto( | ||
| @SerialName("healthInfos") | ||
| val healthInfos: List<HealthInfo> | ||
| ) { | ||
| @Serializable | ||
| data class HealthInfo( | ||
| @SerialName("elderId") | ||
| val elderId: Int, | ||
| @SerialName("diseaseNames") | ||
| val diseaseNames: List<String>, | ||
| @SerialName("medicationSchedules") | ||
| val medicationSchedules: List<MedicationSchedule>, | ||
| @SerialName("notes") | ||
| val notes: List<String> | ||
| ) { | ||
| @Serializable | ||
| data class MedicationSchedule( | ||
| @SerialName("medicationName") | ||
| val medicationName: String, | ||
| @SerialName("scheduleTimes") | ||
| val scheduleTimes: List<String> | ||
| ) | ||
| } | ||
| } |
26 changes: 26 additions & 0 deletions
26
app/src/main/java/com/konkuk/medicarecall/data/dto/request/ElderBulkRegisterRequestDto.kt
This file contains hidden or 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,26 @@ | ||
| package com.konkuk.medicarecall.data.dto.request | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class ElderBulkRegisterRequestDto( | ||
| @SerialName("elders") | ||
| val elders: List<ElderInfo> | ||
| ) { | ||
| @Serializable | ||
| data class ElderInfo( | ||
| @SerialName("name") | ||
| val name: String, | ||
| @SerialName("birthDate") | ||
| val birthDate: String, | ||
| @SerialName("gender") | ||
| val gender: String, | ||
| @SerialName("phone") | ||
| val phone: String, | ||
| @SerialName("relationship") | ||
| val relationship: String, | ||
| @SerialName("residenceType") | ||
| val residenceType: String | ||
| ) | ||
| } |
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/konkuk/medicarecall/data/dto/response/ElderBulkRegisterResponseDto.kt
This file contains hidden or 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,28 @@ | ||
| package com.konkuk.medicarecall.data.dto.response | ||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| typealias ElderBulkRegisterResponseDto = List<ElderInfo> | ||
|
|
||
| @Serializable | ||
| data class ElderInfo( | ||
| @SerialName("id") | ||
| val id: Int, | ||
| @SerialName("name") | ||
| val name: String, | ||
| @SerialName("birthDate") | ||
| val birthDate: String, | ||
| @SerialName("phone") | ||
| val phone: String, | ||
| @SerialName("gender") | ||
| val gender: String, | ||
| @SerialName("relationship") | ||
| val relationship: String, | ||
| @SerialName("residenceType") | ||
| val residenceType: String, | ||
| @SerialName("guardianId") | ||
| val guardianId: Int, | ||
| @SerialName("guardianName") | ||
| val guardianName: String | ||
| ) |
8 changes: 3 additions & 5 deletions
8
app/src/main/java/com/konkuk/medicarecall/data/repository/ElderRegisterRepository.kt
This file contains hidden or 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,11 @@ | ||
| package com.konkuk.medicarecall.data.repository | ||
|
|
||
| import com.konkuk.medicarecall.data.dto.response.ElderBulkRegisterResponseDto | ||
| import com.konkuk.medicarecall.ui.model.ElderData | ||
| import com.konkuk.medicarecall.ui.model.ElderHealthData | ||
|
|
||
| interface ElderRegisterRepository { | ||
| suspend fun postElderHealthInfo(id: Int, elderHealthData: ElderHealthData) | ||
| suspend fun registerElderAndHealth( | ||
| elders: Int, | ||
| elderInfoList: List<ElderData>, | ||
| elderHealthInfo: List<ElderHealthData> | ||
| ): Result<Unit> | ||
| suspend fun postElderBulk(elderList: List<ElderData>): Result<ElderBulkRegisterResponseDto> | ||
| suspend fun postElderHealthInfoBulk(elderHealthList: List<ElderHealthData>): Result<Unit> | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
일괄처리 코드 깔끔하게 잘 작성하신 거 같아요 !