File tree Expand file tree Collapse file tree 3 files changed +10
-12
lines changed
data/src/main/java/com/whyranoid/data
domain/src/main/java/com/whyranoid/domain/model Expand file tree Collapse file tree 3 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 1
1
package com.whyranoid.data.model
2
2
3
- import com.whyranoid.domain.model.DayOfWeek
4
- import com.whyranoid.domain.model.Rule
5
3
import com.whyranoid.domain.model.User
6
4
7
5
data class UserResponse (
@@ -17,12 +15,3 @@ fun UserResponse.toUser() =
17
15
name = this .name,
18
16
profileUrl = this .profileUrl
19
17
)
20
-
21
- fun String.toRule (): Rule {
22
- val ruleString = this .split(" -" )
23
- return Rule (
24
- dayOfWeek = DayOfWeek .values().find { it.dayResId == ruleString[0 ] } ? : DayOfWeek .SUN ,
25
- hour = ruleString[1 ].toInt(),
26
- minute = ruleString[2 ].toInt()
27
- )
28
- }
Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ import com.whyranoid.data.constant.Exceptions.NO_USER_EXCEPTION
9
9
import com.whyranoid.data.model.GroupInfoResponse
10
10
import com.whyranoid.data.model.UserResponse
11
11
import com.whyranoid.data.model.toGroupInfo
12
- import com.whyranoid.data.model.toRule
13
12
import com.whyranoid.data.model.toUser
14
13
import com.whyranoid.domain.model.GroupInfo
14
+ import com.whyranoid.domain.model.toRule
15
15
import kotlinx.coroutines.channels.awaitClose
16
16
import kotlinx.coroutines.flow.Flow
17
17
import kotlinx.coroutines.flow.callbackFlow
Original file line number Diff line number Diff line change @@ -10,6 +10,15 @@ data class Rule(
10
10
}
11
11
}
12
12
13
+ fun String.toRule (): Rule {
14
+ val ruleString = this .split(" -" )
15
+ return Rule (
16
+ dayOfWeek = DayOfWeek .values().find { it.dayResId == ruleString[0 ] } ? : DayOfWeek .SUN ,
17
+ hour = ruleString[1 ].toInt(),
18
+ minute = ruleString[2 ].toInt()
19
+ )
20
+ }
21
+
13
22
enum class DayOfWeek (val dayResId : String ) {
14
23
MON (" 월" ),
15
24
TUE (" 화" ),
You can’t perform that action at this time.
0 commit comments