-
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 pull request #64 from YAPP-Github/feature/TNT-176
[TNT-176] ํธ๋ ์ด๋, ํธ๋ ์ด๋ ๋ฉ์ธ ๋ค๋น๊ฒ์ด์ ๊ธฐ์ด ์ธํ
- Loading branch information
Showing
79 changed files
with
987 additions
and
226 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
9 changes: 9 additions & 0 deletions
9
data/network/src/main/java/co/kr/data/network/model/CheckSessionResponse.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,9 @@ | ||
package co.kr.data.network.model | ||
|
||
import co.kr.data.network.model.enum.MemberType | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class CheckSessionResponse( | ||
val memberType: MemberType, | ||
) |
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
18 changes: 18 additions & 0 deletions
18
data/network/src/main/java/co/kr/data/network/model/enum/MemberType.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,18 @@ | ||
package co.kr.data.network.model.enum | ||
|
||
import co.kr.tnt.domain.model.UserType | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
enum class MemberType { | ||
TRAINER, | ||
TRAINEE, | ||
UNREGISTERED, | ||
} | ||
|
||
fun MemberType.toDomain(): UserType = | ||
when (this) { | ||
MemberType.TRAINER -> UserType.TRAINER | ||
MemberType.TRAINEE -> UserType.TRAINEE | ||
MemberType.UNREGISTERED -> error("๋ฑ๋ก๋์ง ์์ ์ ์ ์ ๋๋ค.") | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package co.kr.tnt.domain.model | ||
|
||
import java.time.LocalDate | ||
|
||
sealed class User { | ||
abstract val id: String | ||
abstract val name: String | ||
abstract val image: String? | ||
|
||
data class Trainer( | ||
override val id: String, | ||
override val name: String, | ||
override val image: String?, | ||
) : User() { | ||
companion object { | ||
val EMPTY = Trainer( | ||
id = "", | ||
name = "", | ||
image = null, | ||
) | ||
} | ||
} | ||
|
||
data class Trainee( | ||
override val id: String, | ||
override val name: String, | ||
override val image: String?, | ||
val birthday: LocalDate?, | ||
val age: Int?, | ||
val weight: Double, | ||
val height: Int, | ||
val ptPurpose: List<String>, | ||
val caution: String?, | ||
) : User() { | ||
companion object { | ||
val EMPTY = Trainee( | ||
id = "", | ||
name = "", | ||
image = null, | ||
birthday = null, | ||
age = 0, | ||
weight = 0.0, | ||
height = 0, | ||
ptPurpose = emptyList(), | ||
caution = null, | ||
) | ||
} | ||
} | ||
} |
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,27 +1,6 @@ | ||
package co.kr.tnt.domain.model | ||
|
||
import java.time.LocalDate | ||
|
||
sealed class UserType { | ||
abstract val id: String | ||
abstract val name: String | ||
abstract val image: String? | ||
|
||
data class Trainer( | ||
override val id: String, | ||
override val name: String, | ||
override val image: String?, | ||
) : UserType() | ||
|
||
data class Trainee( | ||
override val id: String, | ||
override val name: String, | ||
override val image: String?, | ||
val birthday: LocalDate?, | ||
val age: Int?, | ||
val weight: Double, | ||
val height: Int, | ||
val ptPurpose: List<String>, | ||
val caution: String?, | ||
) : UserType() | ||
enum class UserType { | ||
TRAINER, | ||
TRAINEE, | ||
} |
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
4 changes: 2 additions & 2 deletions
4
domain/src/main/java/co/kr/tnt/domain/repository/SignUpRepository.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
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
Oops, something went wrong.