Skip to content

Commit

Permalink
Merge branch 'ARCH-22-feat/login_signup_front' of https://github.com/…
Browse files Browse the repository at this point in the history
…tukcomCD2024/DroidBlossom into ARCH-22-feat/login_signup_front
  • Loading branch information
hangunhee39 committed Jan 18, 2024
2 parents a07d4eb + fd2c4f9 commit ba77e9d
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 3 deletions.
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
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
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
)
}
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
)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.droidblossom.archive.domain.model
package com.droidblossom.archive.domain.model.auth

data class SMSMessage(
val content : String
Expand Down
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)
)
}
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)
)
}
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
)
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 { "" }
)
}
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
)
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)
}
}

0 comments on commit ba77e9d

Please sign in to comment.