-
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.
- ์๋ก๊ณ ์นจ ๋ ์ด์์ ์ถ๊ฐ - ๊ฐ๊ฒฉ ์์ ๊ธฐ๋ฅ ๊ตฌํ - ์์ธํ์ด์ง ํธ๋ํน ๋ชฉ๋ก์ ์ถ๊ฐ ๊ธฐ๋ฅ ๊ตฌํ - ์๋ธ๋ชจ๋ ์ฐ๊ฒฐ - ์ฐจํธ ui ์ถ๊ฐ - Ping API ๊ตฌํ - Logger ๋ฏธ๋ค์จ์ด ์ถ๊ฐ - ์ต์ refreshToken ๋ฌดํจํ - MongoDB ์ฐ๋ - ์ํ ์ ๋ณด Cache, ๊ธฐ๊ฐ๋ณ ์ํ ๊ฐ๊ฒฉ ๋ณ๋ ์กฐํ - ์ฃผ๊ธฐ์ ์ผ๋ก ์ํ ์กฐํ, DB์ ์ต์ ์ ๋ณด ๋ฐ์ - ์ํ ์ธ๊ธฐ ์์ ์์ด๋ ๋ฒ๊ทธ ์์ - ์ํ ๋ชฉ๋ก API ์๋ต ๋ด์ฉ ์์ - MongoDB Schema ์์ - ์ถ์ฒ/์ถ์ ์ํ ๋ชฉ๋ก ์กฐํ API์์ ๊ฐ๊ฒฉ ๊ทธ๋ํ ๋ฐ์ดํฐ ๋ฐ ์ต์ ๊ฐ๊ฒฉ ์ ๋ณด ๋๊ธฐํ ์ฐจํธ ๋ ํฌ ์ฃผ์ : https://github.com/Taewan-P/material-android-chart Co-Authored-By: EunhoKang <[email protected]> Co-Authored-By: ootr47 <[email protected]> Co-Authored-By: ์๋ฌธ๊ธฐ <[email protected]> Co-Authored-By: ByeongIk Choi <[email protected]>
- Loading branch information
1 parent
0e32b7c
commit 7e62010
Showing
79 changed files
with
2,073 additions
and
945 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "android/materialchart"] | ||
path = android/materialchart | ||
url = https://github.com/Taewan-P/material-android-chart | ||
branch = release |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
10 changes: 10 additions & 0 deletions
10
android/app/src/main/java/app/priceguard/data/dto/PriceDataDTO.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,10 @@ | ||
package app.priceguard.data.dto | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class PriceDataDTO( | ||
val time: Float? = null, | ||
val price: Int? = null, | ||
val isSoldOut: Boolean? = null | ||
) |
9 changes: 9 additions & 0 deletions
9
android/app/src/main/java/app/priceguard/data/dto/PricePatchRequest.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 app.priceguard.data.dto | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class PricePatchRequest( | ||
val productCode: String, | ||
val targetPrice: Int | ||
) |
9 changes: 9 additions & 0 deletions
9
android/app/src/main/java/app/priceguard/data/dto/PricePatchResponse.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 app.priceguard.data.dto | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class PricePatchResponse( | ||
val statusCode: Int, | ||
val message: String | ||
) |
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
android/app/src/main/java/app/priceguard/data/dto/ProductErrorState.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 app.priceguard.data.dto | ||
|
||
enum class ProductErrorState { | ||
PERMISSION_DENIED, | ||
INVALID_REQUEST, | ||
NOT_FOUND, | ||
EXIST, | ||
UNDEFINED_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
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
24 changes: 24 additions & 0 deletions
24
android/app/src/main/java/app/priceguard/data/graph/GraphDataConverter.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,24 @@ | ||
package app.priceguard.data.graph | ||
|
||
import app.priceguard.data.dto.PriceDataDTO | ||
|
||
class GraphDataConverter { | ||
|
||
// TODO: ๊ธฐ๊ฐ๋ณ๋ก ๋ฐ์ดํฐ ํํฐ๋ง์ ํตํด ํด๋น ๊ธฐ๊ฐ์ ๋ฐ์ํ ๊ฐ๊ฒฉ ๋ณ๋๋ง ์ถ์ ํ๋๋ก ๊ตฌ์กฐ ๋ณ๊ฒฝ. | ||
fun toDataset(priceData: List<PriceDataDTO>?): List<ProductChartData> { | ||
priceData ?: return listOf() | ||
if (priceData.isEmpty()) { | ||
return listOf() | ||
} | ||
val dataList = mutableListOf<ProductChartData>() | ||
priceData.forEach { dto -> | ||
dto.time ?: return@forEach | ||
dto.price ?: return@forEach | ||
dto.isSoldOut ?: return@forEach | ||
dataList.add(ProductChartData(dto.time / 1000, dto.price.toFloat(), dto.isSoldOut.not())) | ||
} | ||
val currentTime = (System.currentTimeMillis() / 1000).toFloat() | ||
dataList.add(ProductChartData(currentTime, dataList.last().y, dataList.last().valid)) | ||
return dataList.toList().sortedBy { it.x }.filter { it.x <= currentTime } | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
android/app/src/main/java/app/priceguard/data/graph/ProductChartData.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 app.priceguard.data.graph | ||
|
||
import app.priceguard.materialchart.data.ChartData | ||
|
||
data class ProductChartData( | ||
override val x: Float, | ||
override val y: Float, | ||
override val valid: Boolean | ||
) : ChartData |
15 changes: 15 additions & 0 deletions
15
android/app/src/main/java/app/priceguard/data/graph/ProductChartDataset.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,15 @@ | ||
package app.priceguard.data.graph | ||
|
||
import app.priceguard.materialchart.data.ChartData | ||
import app.priceguard.materialchart.data.ChartDataset | ||
import app.priceguard.materialchart.data.GraphMode | ||
import app.priceguard.materialchart.data.GridLine | ||
|
||
data class ProductChartDataset( | ||
override val showXAxis: Boolean, | ||
override val showYAxis: Boolean, | ||
override val isInteractive: Boolean, | ||
override val graphMode: GraphMode, | ||
override val data: List<ChartData>, | ||
override val gridLines: List<GridLine> | ||
) : ChartDataset |
8 changes: 8 additions & 0 deletions
8
android/app/src/main/java/app/priceguard/data/graph/ProductChartGridLine.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 app.priceguard.data.graph | ||
|
||
import app.priceguard.materialchart.data.GridLine | ||
|
||
data class ProductChartGridLine( | ||
override val name: String, | ||
override val value: Float | ||
) : GridLine |
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
10 changes: 10 additions & 0 deletions
10
android/app/src/main/java/app/priceguard/data/network/ProductRepositoryResult.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,10 @@ | ||
package app.priceguard.data.network | ||
|
||
import app.priceguard.data.dto.ProductErrorState | ||
|
||
sealed class ProductRepositoryResult<out T> { | ||
|
||
data class Success<out T>(val data: T) : ProductRepositoryResult<T>() | ||
|
||
data class Error(val productErrorState: ProductErrorState) : ProductRepositoryResult<Nothing>() | ||
} |
Oops, something went wrong.