generated from AND-SOPT-ANDROID/and-sopt-android-template
-
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.
feat/#8: BaseResponse 및 SignUpResponse, SignUpRequest 추가
- Loading branch information
1 parent
f704238
commit aeecfcf
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
data/src/main/java/org/sopt/and/data/dto/request/SignUpRequest.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,11 @@ | ||
package org.sopt.and.data.dto.request | ||
|
||
import kotlinx.serialization.Serializable | ||
import org.sopt.and.domain.model.User | ||
|
||
@Serializable | ||
data class SignUpRequest( | ||
val hobby: String, | ||
val password: String, | ||
val username: String | ||
) |
8 changes: 8 additions & 0 deletions
8
data/src/main/java/org/sopt/and/data/dto/response/BaseResponse.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 org.sopt.and.data.dto.response | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
internal data class BaseResponse<T>( | ||
val result: T | ||
) |
17 changes: 17 additions & 0 deletions
17
data/src/main/java/org/sopt/and/data/dto/response/SignUpResponse.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 org.sopt.and.data.dto.response | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
import org.sopt.and.domain.model.SignUp | ||
|
||
@Serializable | ||
internal data class SignUpResponse( | ||
@SerialName("no") | ||
val userNumber: Int | ||
){ | ||
fun toDomainModel(): SignUp { | ||
return SignUp( | ||
userNumber = userNumber | ||
) | ||
} | ||
} |