-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ARCH-22-feat/login_signup_front' of https://github.com/…
…tukcomCD2024/DroidBlossom into ARCH-22-feat/login_signup_front
- Loading branch information
Showing
11 changed files
with
109 additions
and
3 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
...p/src/main/java/com/droidblossom/archive/data/dto/member/request/CheckStatusRequestDto.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,8 @@ | ||
package com.droidblossom.archive.data.dto.member.request | ||
|
||
import java.io.Serializable | ||
|
||
data class CheckStatusRequestDto( | ||
val authId : String, | ||
val socialType : String | ||
) : Serializable |
8 changes: 8 additions & 0 deletions
8
...ain/java/com/droidblossom/archive/data/dto/member/request/MemberDetailUpdateRequestDto.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,8 @@ | ||
package com.droidblossom.archive.data.dto.member.request | ||
import java.io.Serializable | ||
|
||
|
||
data class MemberDetailUpdateRequestDto( | ||
val nickname : String, | ||
val profileImage : String | ||
) : Serializable |
17 changes: 17 additions & 0 deletions
17
...rc/main/java/com/droidblossom/archive/data/dto/member/response/MemberDetailResponseDto.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.droidblossom.archive.data.dto.member.response | ||
|
||
import com.droidblossom.archive.domain.model.member.MemberDetail | ||
import java.io.Serializable | ||
|
||
data class MemberDetailResponseDto( | ||
val nickname : String, | ||
val profileUrl : String, | ||
val phone : String | ||
) : Serializable { | ||
|
||
fun toModel() = MemberDetail( | ||
nickname = this.nickname, | ||
profileUrl = this.profileUrl.ifEmpty { null }, | ||
phone = this.phone | ||
) | ||
} |
14 changes: 14 additions & 0 deletions
14
...rc/main/java/com/droidblossom/archive/data/dto/member/response/MemberStatusResponseDto.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,14 @@ | ||
package com.droidblossom.archive.data.dto.member.response | ||
|
||
import com.droidblossom.archive.domain.model.member.MemberStatus | ||
import java.io.Serializable | ||
|
||
data class MemberStatusResponseDto( | ||
val isExist : Boolean, | ||
val isVerified : Boolean | ||
) : Serializable { | ||
fun toModel() = MemberStatus( | ||
isExist = this.isExist, | ||
isVerified = this.isExist | ||
) | ||
} |
2 changes: 1 addition & 1 deletion
2
...lossom/archive/domain/model/SMSMessage.kt → ...m/archive/domain/model/auth/SMSMessage.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
6 changes: 4 additions & 2 deletions
6
frontend/ARchive/app/src/main/java/com/droidblossom/archive/domain/model/auth/SignUp.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,17 +1,19 @@ | ||
package com.droidblossom.archive.domain.model.auth | ||
|
||
import com.droidblossom.archive.data.dto.auth.request.SignUpRequestDto | ||
import com.droidblossom.archive.presentation.ui.auth.AuthViewModel | ||
import com.droidblossom.archive.util.SocialUtils | ||
|
||
data class SignUp( | ||
val authId: String, | ||
val email: String, | ||
val profileUrl: String, | ||
val socialType: String | ||
val socialType: AuthViewModel.Social | ||
){ | ||
fun toDto() = SignUpRequestDto( | ||
authId = this.authId, | ||
email = this.email, | ||
profileUrl = this.profileUrl, | ||
socialType = this.socialType | ||
socialType = SocialUtils.enumToString(this.socialType) | ||
) | ||
} |
15 changes: 15 additions & 0 deletions
15
...end/ARchive/app/src/main/java/com/droidblossom/archive/domain/model/member/CheckStatus.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,15 @@ | ||
package com.droidblossom.archive.domain.model.member | ||
|
||
import com.droidblossom.archive.data.dto.member.request.CheckStatusRequestDto | ||
import com.droidblossom.archive.presentation.ui.auth.AuthViewModel | ||
import com.droidblossom.archive.util.SocialUtils | ||
|
||
data class CheckStatus ( | ||
val authId : String, | ||
val socialType : AuthViewModel.Social | ||
){ | ||
fun toDto() = CheckStatusRequestDto( | ||
authId = this.authId, | ||
socialType = SocialUtils.enumToString(this.socialType) | ||
) | ||
} |
7 changes: 7 additions & 0 deletions
7
...nd/ARchive/app/src/main/java/com/droidblossom/archive/domain/model/member/MemberDetail.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.droidblossom.archive.domain.model.member | ||
|
||
data class MemberDetail( | ||
val nickname : String, | ||
val profileUrl : String?, | ||
val phone : String | ||
) |
13 changes: 13 additions & 0 deletions
13
...hive/app/src/main/java/com/droidblossom/archive/domain/model/member/MemberDetailUpdate.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.droidblossom.archive.domain.model.member | ||
|
||
import com.droidblossom.archive.data.dto.member.request.MemberDetailUpdateRequestDto | ||
|
||
data class MemberDetailUpdate ( | ||
val nickname : String, | ||
val profileImage : String | ||
){ | ||
fun toDto() = MemberDetailUpdateRequestDto( | ||
nickname = this.nickname, | ||
profileImage = this.profileImage.ifBlank { "" } | ||
) | ||
} |
6 changes: 6 additions & 0 deletions
6
...nd/ARchive/app/src/main/java/com/droidblossom/archive/domain/model/member/MemberStatus.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,6 @@ | ||
package com.droidblossom.archive.domain.model.member | ||
|
||
data class MemberStatus( | ||
val isExist : Boolean, | ||
val isVerified : Boolean | ||
) |
16 changes: 16 additions & 0 deletions
16
frontend/ARchive/app/src/main/java/com/droidblossom/archive/util/SocialUtil.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,16 @@ | ||
package com.droidblossom.archive.util | ||
|
||
import com.droidblossom.archive.presentation.ui.auth.AuthViewModel | ||
|
||
object SocialUtils { | ||
|
||
// enum을 문자열로 변환 | ||
fun enumToString(social: AuthViewModel.Social): String { | ||
return social.name | ||
} | ||
|
||
// 문자열을 enum으로 변환 | ||
fun stringToEnum(socialString: String): AuthViewModel.Social { | ||
return AuthViewModel.Social.valueOf(socialString) | ||
} | ||
} |