-
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(explore): tạo study set bằng AI (sử dụng coin để tạo)
- Loading branch information
Showing
26 changed files
with
358 additions
and
80 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
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/pwhs/quickmem/core/data/enums/CoinAction.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.pwhs.quickmem.core.data.enums | ||
|
||
enum class CoinAction (val action: String) { | ||
ADD("add"), | ||
SUBTRACT("subtract") | ||
} |
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
12 changes: 12 additions & 0 deletions
12
app/src/main/java/com/pwhs/quickmem/data/dto/user/UpdateCoinRequestDto.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,12 @@ | ||
package com.pwhs.quickmem.data.dto.user | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class UpdateCoinRequestDto( | ||
@SerializedName("userId") | ||
val userId: String, | ||
@SerializedName("coin") | ||
val coin: Int, | ||
@SerializedName("action") | ||
val action: String | ||
) |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/com/pwhs/quickmem/data/dto/user/UpdateCoinResponseDto.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,12 @@ | ||
package com.pwhs.quickmem.data.dto.user | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class UpdateCoinResponseDto( | ||
@SerializedName("message") | ||
val message: String, | ||
@SerializedName("coinAction") | ||
val coinAction: String, | ||
@SerializedName("coins") | ||
val coins: Int | ||
) |
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
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/pwhs/quickmem/data/mapper/user/UpdateCoinRequestMapper.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.pwhs.quickmem.data.mapper.user | ||
|
||
import com.pwhs.quickmem.data.dto.user.UpdateCoinRequestDto | ||
import com.pwhs.quickmem.domain.model.users.UpdateCoinRequestModel | ||
|
||
fun UpdateCoinRequestDto.toModel() = UpdateCoinRequestModel( | ||
userId = userId, | ||
coin = coin, | ||
action = action | ||
) | ||
|
||
fun UpdateCoinRequestModel.toDto() = UpdateCoinRequestDto( | ||
userId = userId, | ||
coin = coin, | ||
action = action | ||
) |
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/pwhs/quickmem/data/mapper/user/UpdateCoinResponseMapper.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.pwhs.quickmem.data.mapper.user | ||
|
||
import com.pwhs.quickmem.data.dto.user.UpdateCoinResponseDto | ||
import com.pwhs.quickmem.domain.model.users.UpdateCoinResponseModel | ||
|
||
fun UpdateCoinResponseDto.toModel() = UpdateCoinResponseModel( | ||
message = message, | ||
coinAction = coinAction, | ||
coins = coins | ||
) | ||
|
||
fun UpdateCoinResponseModel.toDto() = UpdateCoinResponseDto( | ||
message = message, | ||
coinAction = coinAction, | ||
coins = coins | ||
) |
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
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/pwhs/quickmem/domain/model/users/UpdateCoinRequestModel.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.pwhs.quickmem.domain.model.users | ||
|
||
data class UpdateCoinRequestModel( | ||
val userId: String, | ||
val coin: Int, | ||
val action: String | ||
) |
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/pwhs/quickmem/domain/model/users/UpdateCoinResponseModel.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.pwhs.quickmem.domain.model.users | ||
|
||
data class UpdateCoinResponseModel( | ||
val message: String, | ||
val coinAction: String, | ||
val coins: Int | ||
) |
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.