-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/PawWithU/ConnectDog-AOS …
…into feature/management # Conflicts: # core/data/src/main/java/com/kusitms/connectdog/core/data/mapper/ReviewMapper.kt # core/data/src/main/java/com/kusitms/connectdog/core/data/repository/ManagementRepository.kt # core/data/src/main/java/com/kusitms/connectdog/core/data/repository/ManagementRepositoryImpl.kt # core/data/src/main/java/com/kusitms/connectdog/core/data/repository/SignUpRepository.kt # core/data/src/main/java/com/kusitms/connectdog/core/data/repository/SignUpRepositoryImpl.kt # feature/main/src/main/java/com/kusitms/connectdog/feature/main/MainScreen.kt # feature/management/src/main/java/com/kusitms/connectdog/feature/management/navigation/ManagementNavigation.kt # feature/management/src/main/java/com/kusitms/connectdog/feature/management/screen/CreateReviewScreen.kt # feature/management/src/main/java/com/kusitms/connectdog/feature/management/screen/ManagementScreen.kt # feature/management/src/main/java/com/kusitms/connectdog/feature/management/viewmodel/ReviewViewModel.kt # feature/signup/src/main/java/com/kusitms/connectdog/signup/screen/common/CeritificationScreen.kt # feature/signup/src/main/java/com/kusitms/connectdog/signup/screen/common/CompleteSignUpScreen.kt # feature/signup/src/main/java/com/kusitms/connectdog/signup/screen/intermediator/IntermediatorInformationScreen.kt # feature/signup/src/main/java/com/kusitms/connectdog/signup/screen/intermediator/IntermediatorProfileScreen.kt # feature/signup/src/main/java/com/kusitms/connectdog/signup/viewmodel/SignUpViewModel.kt
- Loading branch information
Showing
670 changed files
with
3,366 additions
and
907 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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
5 changes: 5 additions & 0 deletions
5
...ta/src/main/java/com/kusitms/connectdog/core/data/api/model/IsDuplicatePhoneNumberBody.kt
This file contains 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,5 @@ | ||
package com.kusitms.connectdog.core.data.api.model | ||
|
||
data class IsDuplicatePhoneNumberBody( | ||
val phone: String | ||
) |
7 changes: 7 additions & 0 deletions
7
...rc/main/java/com/kusitms/connectdog/core/data/api/model/IsDuplicatePhoneNumberResponse.kt
This file contains 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,7 @@ | ||
package com.kusitms.connectdog.core.data.api.model | ||
|
||
data class IsDuplicatePhoneNumberResponse( | ||
val isDuplicated: Boolean, | ||
val socialType: String?, | ||
val email: String? | ||
) |
17 changes: 17 additions & 0 deletions
17
...ain/java/com/kusitms/connectdog/core/data/api/model/intermediator/CreateApplicationDto.kt
This file contains 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,17 @@ | ||
package com.kusitms.connectdog.core.data.api.model.intermediator | ||
|
||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class CreateApplicationDto( | ||
val departureLoc: String, | ||
val arrivalLoc: String, | ||
val startDate: String, | ||
val endDate: String, | ||
val pickUpTime: String, | ||
val isKennel: Boolean, | ||
val content: String, | ||
val dogName: String, | ||
val dogSize: String, | ||
val specifics: String | ||
) |
27 changes: 27 additions & 0 deletions
27
...m/kusitms/connectdog/core/data/api/model/intermediator/InterAnnouncementDetailResponse.kt
This file contains 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,27 @@ | ||
package com.kusitms.connectdog.core.data.api.model.intermediator | ||
|
||
import com.kusitms.connectdog.core.data.api.model.volunteer.NoticeDetailResponseItem | ||
|
||
data class InterAnnouncementDetailResponse( | ||
val arrivalLoc: String, | ||
val content: String, | ||
val departureLoc: String, | ||
val dogName: String, | ||
val dogSize: String, | ||
val endDate: String, | ||
val images: List<String>, | ||
val intermediaryId: Int, | ||
val intermediaryName: String, | ||
val intermediaryProfileImage: String, | ||
val isKennel: Boolean, | ||
val mainImage: String, | ||
val pickUpTime: String, | ||
val postId: Int, | ||
val postStatus: String, | ||
val specifics: String?, | ||
val startDate: String | ||
) { | ||
fun toData() = NoticeDetailResponseItem( | ||
arrivalLoc, content, departureLoc, dogName, dogSize, endDate, images, intermediaryId, intermediaryName, intermediaryProfileImage, isBookmark = false, isKennel, mainImage, pickUpTime, postId, postStatus, specifics, startDate | ||
) | ||
} |
13 changes: 13 additions & 0 deletions
13
.../java/com/kusitms/connectdog/core/data/api/model/intermediator/IntermediatorSignUpBody.kt
This file contains 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,13 @@ | ||
package com.kusitms.connectdog.core.data.api.model.intermediator | ||
|
||
data class IntermediatorSignUpBody( | ||
val isOptionAgr: Boolean, | ||
val realName: String, | ||
val phone: String, | ||
val email: String, | ||
val password: String, | ||
val name: String, | ||
val intro: String, | ||
val url: String, | ||
val contact: String | ||
) |
This file contains 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
19 changes: 19 additions & 0 deletions
19
...rc/main/java/com/kusitms/connectdog/core/data/api/model/volunteer/ReviewDetailResponse.kt
This file contains 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,19 @@ | ||
package com.kusitms.connectdog.core.data.api.model.volunteer | ||
|
||
data class ReviewDetailResponse( | ||
val profileImageNum: Int, | ||
val dogName: String, | ||
val volunteerNickname: String, | ||
val createdDate: String, | ||
val mainImage: String, | ||
val images: List<String>, | ||
val content: String, | ||
val postId: Long, | ||
val postMainImage: String, | ||
val startDate: String, | ||
val endDate: String, | ||
val departureLoc: String, | ||
val arrivalLoc: String, | ||
val intermediaryId: Long, | ||
val intermediaryName: String | ||
) |
This file contains 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 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
1 change: 1 addition & 0 deletions
1
core/data/src/main/java/com/kusitms/connectdog/core/data/mapper/ReviewMapper.kt
This file contains 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
7 changes: 6 additions & 1 deletion
7
core/data/src/main/java/com/kusitms/connectdog/core/data/repository/InterHomeRepository.kt
This file contains 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,3 +1,8 @@ | ||
package com.kusitms.connectdog.core.data.repository | ||
|
||
interface InterHomeRepository | ||
import com.kusitms.connectdog.core.data.api.model.intermediator.CreateApplicationDto | ||
import java.io.File | ||
|
||
interface InterHomeRepository { | ||
suspend fun createApplication(body: CreateApplicationDto, images: List<File>) | ||
} |
27 changes: 26 additions & 1 deletion
27
...data/src/main/java/com/kusitms/connectdog/core/data/repository/InterHomeRepositoryImpl.kt
This file contains 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,3 +1,28 @@ | ||
package com.kusitms.connectdog.core.data.repository | ||
|
||
class InterHomeRepositoryImpl | ||
import com.google.gson.Gson | ||
import com.kusitms.connectdog.core.data.api.InterApiService | ||
import com.kusitms.connectdog.core.data.api.model.intermediator.CreateApplicationDto | ||
import okhttp3.MediaType.Companion.toMediaTypeOrNull | ||
import okhttp3.MultipartBody | ||
import okhttp3.RequestBody | ||
import java.io.File | ||
import javax.inject.Inject | ||
|
||
internal class InterHomeRepositoryImpl @Inject constructor( | ||
private val api: InterApiService | ||
) : InterHomeRepository { | ||
override suspend fun createApplication(body: CreateApplicationDto, images: List<File>) { | ||
val jsonBody = RequestBody.create( | ||
"application/json; charset=utf-8".toMediaTypeOrNull(), | ||
Gson().toJson(body) | ||
) | ||
|
||
val files = images.map { file -> | ||
val fileBody = RequestBody.create("multipart/form-data".toMediaTypeOrNull(), file) | ||
MultipartBody.Part.createFormData("files", file.name, fileBody) | ||
} | ||
|
||
api.postApplication(jsonBody, files) | ||
} | ||
} |
Oops, something went wrong.