Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
3030f52
feat(question): ์‹ ๊ณ ํ•˜๊ธฐ ํด๋ฆญ ์ด๋ฒคํŠธ
se05503 Jan 30, 2026
78d359a
feat(letter): ํŽธ์ง€ ์ƒ‰์ƒ ์„ ํƒ
se05503 Jan 30, 2026
78c1718
feat(letter): ํŽธ์ง€ ์“ฐ๊ธฐ ์ œํ•œ
se05503 Jan 30, 2026
c30f44c
design(letter): ์นœ๊ตฌ ๋ฆฌ์ŠคํŠธ ์—ด๊ธฐ ํŒ์—… UI
se05503 Jan 30, 2026
05a38e2
feat(letter): ํŽธ์ง€ ์“ฐ๊ธฐ ์นœ๊ตฌ ๊ธฐ๋Šฅ
se05503 Jan 31, 2026
cc0c0fc
feat(letter): ํŽธ์ง€ ์ „์†ก API ์„ธํŒ…
se05503 Jan 31, 2026
5d6882f
chore: ๋นŒ๋“œ ์„ค์ • ๋ณ€๊ฒฝ
se05503 Feb 1, 2026
87b8111
feat(letter): ์นœ๊ตฌ ์„ ํƒ ์‹œ ๋‹ค์ด์–ผ๋กœ๊ทธ ์—ด๊ธฐ
se05503 Feb 1, 2026
8d22bbc
refactor(di): Retrofit, OkHttpClient ์ค‘๋ณต ๋ฐ”์ธ๋”ฉ ํ—ˆ์šฉ
se05503 Feb 1, 2026
e030f15
rename: di ํŒจํ‚ค์ง€ ๋ถ„๋ฆฌ
se05503 Feb 1, 2026
f3f6f6f
feat(letter): ๋‚˜์œ๋ง ๊ฐ์ง€(AI) API ์„ธํŒ…
se05503 Feb 1, 2026
c8b5b35
design(letter): ๋‚˜์œ๋ง ํ†ต๊ณผ ์—ฌ๋ถ€ ๋‹ค์ด์–ผ๋กœ๊ทธ UI ์ œ์ž‘
se05503 Feb 2, 2026
9882be2
style(letter): ๋ฆฌ์†Œ์Šค ๋ณ€๊ฒฝ
se05503 Feb 2, 2026
846a93d
feat(letter): ํŽธ์ง€ ์ž‘์„ฑํ•˜๊ธฐ API ์—ฐ๊ฒฐ
se05503 Feb 2, 2026
a4d3130
feat(letter): ๋‚ด๊ฐ€ ๋‹ต์žฅํ•ด์•ผ ํ•  '๋„์ฐฉ ํŽธ์ง€' 1๊ฑด ๊ฐ€์ ธ์˜ค๊ธฐ API ์—ฐ๊ฒฐ
se05503 Feb 3, 2026
7ceeb86
feat(letter): ํŽธ์ง€ ๋‹ต์žฅ ํŒ์—… ๋‹ค์ด์–ผ๋กœ๊ทธ ๋ฐ ํ™”๋ฉด ์ด๋™
se05503 Feb 3, 2026
3a29f2b
feat(letter): ํŽธ์ง€ ๋‹ต์žฅ ๋กœ์ง ๊ตฌํ˜„
se05503 Feb 3, 2026
4ddea17
feat(letter): ์œ ๋ฃŒ ํŽธ์ง€์ง€ ์„ ํƒ ๊ตฌํ˜„
se05503 Feb 4, 2026
cb29adf
rename(letter): ํŽธ์ง€์ง€ ์ƒ‰์ƒ ํŒจํ‚ค์ง€ ์ด๋™, ์ƒ‰์ƒ ๋ณ€๊ฒฝ
se05503 Feb 4, 2026
f68a10c
feat(letter): ํŽธ์ง€ ๋‹ต์žฅํ•˜๊ธฐ API ์—ฐ๊ฒฐ
se05503 Feb 4, 2026
2a57cbd
rename(letter): ํŽธ์ง€ ๋‹ต์žฅ ๋ณด์ƒ ๋„ค์ด๋ฐ ๋ณ€๊ฒฝ
se05503 Feb 4, 2026
c362f29
feat(letter): ํŽธ์ง€ ๋‹ต์žฅ ์ง€์—ฐ ์ฒ˜๋ฆฌ API ์—ฐ๊ฒฐ
se05503 Feb 4, 2026
14f57ac
feat(letter): ํŽธ์ง€ ๋‹ต์žฅ ํฌ๊ธฐ API ์—ฐ๊ฒฐ
se05503 Feb 4, 2026
5df1fec
Merge remote-tracking branch 'origin/develop' into feat/square
se05503 Feb 5, 2026
e7c4897
feat(letter): ๋‚ด๊ฐ€ ๋ณด๋‚ธ ํŽธ์ง€ ์กฐํšŒ API ์—ฐ๊ฒฐ
se05503 Feb 5, 2026
585c968
refactor(di): ๋จธ์ง€ ์ดํ›„ di ์ฝ”๋“œ ์ •๋ฆฌ
se05503 Feb 5, 2026
f88e784
refactor(di): di ์ฝ”๋“œ ๊ฐœ์„ 
se05503 Feb 6, 2026
b01edae
feat(letter): ๋‚ด๊ฐ€ ๋ณด๋‚ธ ํŽธ์ง€ + ๋‹ต์žฅ ๋‚ด์šฉ ํ•จ๊ป˜ ๋ณด๊ธฐ API ์—ฐ๊ฒฐ
se05503 Feb 6, 2026
a389495
fix(letter): UI anchorView ๋ทฐ์ƒํƒœ ๋™์  ๋ณ€๊ฒฝ
se05503 Feb 6, 2026
c96fbd1
feat(letter): ํŽธ์ง€ ๋‹ต์žฅ ์‹ ๊ณ ํ•˜๊ธฐ API ์—ฐ๊ฒฐ
se05503 Feb 6, 2026
f910481
feat(letter): ๋‹ต์žฅ ์Šค๋ ˆ๋“œ ์‚ญ์ œ(๋‚ด ํŽธ์ง€+๋‹ต์žฅ ์‚ญ์ œ) API ์—ฐ๊ฒฐ
se05503 Feb 6, 2026
b21ef5b
Merge remote-tracking branch 'origin/develop' into feat/square
se05503 Feb 9, 2026
5dacc4d
chore: ๊ธฐํƒ€์‚ฌํ•ญ ์ˆ˜์ •
se05503 Feb 9, 2026
fa1b607
style(letter): ์ƒ‰์ƒ ๋ณ€๊ฒฝ
se05503 Feb 9, 2026
821a77a
refactor(daily): ์ผ๊ฐ„ ์นญ์ฐฌ์„œ ๋ชฉ๋ก ์กฐํšŒ API ์—ฐ๊ฒฐ
se05503 Feb 9, 2026
aacbfa6
feat(daily): ์ผ๊ฐ„ ์นญ์ฐฌ์„œ ์ƒ์„ธ ์กฐํšŒ API ์—ฐ๊ฒฐ
se05503 Feb 9, 2026
6c0f065
feat(egoroom): ์ผ๊ฐ„/์ฃผ๊ฐ„ ๋ณด๊ณ ์„œ ์ˆ˜์‹  ์—ฌ๋ถ€ ์กฐํšŒ API ์—ฐ๊ฒฐ
se05503 Feb 9, 2026
9b2677e
feat(daily): ์ผ๊ฐ„์นญ์ฐฌ์„œ ์ˆ˜์‹ ์—ฌ๋ถ€ ์„ค์ • API ์—ฐ๊ฒฐ
se05503 Feb 9, 2026
1c44f0e
feat(daily): ์ฃผ๊ฐ„๋ณด๊ณ ์„œ ์ˆ˜์‹ ์—ฌ๋ถ€ ์„ค์ • API ์—ฐ๊ฒฐ
se05503 Feb 9, 2026
149cb2b
refactor(egoroom): ๋ทฐ๋ชจ๋ธ ๋ถ„๋ฆฌ
se05503 Feb 9, 2026
e899246
feat(weekly): ์ฃผ๊ฐ„ ๋ณด๊ณ ์„œ ์ž ๊ธˆ ํ•ด์ œ ๋‹ค์ด์–ผ๋กœ๊ทธ
se05503 Feb 10, 2026
d84251c
feat(weekly): ์ฃผ๊ฐ„ ์ƒ๋‹ด์„œ ๋ชฉ๋ก ์กฐํšŒ API ์—ฐ๊ฒฐ
se05503 Feb 10, 2026
0ee6163
feat(weekly): ์ฃผ๊ฐ„ ์ƒ๋‹ด์„œ ์ƒ์„ธ ์กฐํšŒ API ์—ฐ๊ฒฐ
se05503 Feb 10, 2026
d1f417b
refactor(weekly): ๋‹ค์Œ์ฃผ ์ƒ๋‹ด ๋ถ„์œ„๊ธฐ ๋ณ€๊ฒฝ API ์—ฐ๊ฒฐ
se05503 Feb 10, 2026
334d0b6
feat(weekly): ์ฃผ๊ฐ„ ์ƒ๋‹ด์„œ ์ž ๊ธˆ ํ•ด์ œ API ์—ฐ๊ฒฐ (์ž‰ํฌ ์‚ฌ์šฉ)
se05503 Feb 10, 2026
2637ca7
refactor(weekly): ์ฃผ๊ฐ„ ๋ฆฌํฌํŠธ ๋ถ„์œ„๊ธฐ ์กฐํšŒ API ์—ฐ๊ฒฐ
se05503 Feb 10, 2026
757b1ea
design(ego-room): ์—๊ณ ๋ฃธ ๋ฉ”์ธ ํ™”๋ฉด ํ…์ŠคํŠธ UI ๋ณ€๊ฒฝ
se05503 Feb 11, 2026
884be00
design(ego-room): ์—๊ณ ๋ฃธ ์ผ๊ฐ„ ์นญ์ฐฌ์„œ ํ™”๋ฉด ํ…์ŠคํŠธ UI ๋ณ€๊ฒฝ
se05503 Feb 11, 2026
d850110
design(ego-room): ์—๊ณ ๋ฃธ ์ฃผ๊ฐ„ ์นญ์ฐฌ์„œ ํ™”๋ฉด ํ…์ŠคํŠธ UI ๋ณ€๊ฒฝ
se05503 Feb 11, 2026
9364c35
design(ego-room): ์—๊ณ ๋ฃธ ํ†ต๊ณ„ ํ™”๋ฉด ํ…์ŠคํŠธ UI ๋ณ€๊ฒฝ
se05503 Feb 11, 2026
17f7d0f
design(square): ๊ด‘์žฅ ๋ฉ”์ธ ํ™”๋ฉด ํ…์ŠคํŠธ UI ๋ณ€๊ฒฝ
se05503 Feb 11, 2026
edc2990
design(square): ๊ด‘์žฅ ํŽธ์ง€ ํ™”๋ฉด ํ…์ŠคํŠธ UI ๋ณ€๊ฒฝ
se05503 Feb 11, 2026
ccf38db
design(square): ๊ด‘์žฅ ์งˆ๋ฌธ ํ™”๋ฉด ํ…์ŠคํŠธ UI ๋ณ€๊ฒฝ
se05503 Feb 11, 2026
23d1b5f
design(square): ๊ด‘์žฅ ์นœ๊ตฌ ํ™”๋ฉด ํ…์ŠคํŠธ UI ๋ณ€๊ฒฝ
se05503 Feb 11, 2026
1e5f318
refactor: ๋จธ์ง€ ์ด์ „ ์ฝ”๋“œ ์ ๊ฒ€
se05503 Feb 11, 2026
bfe2adb
Merge remote-tracking branch 'origin/develop' into feat/counseling
se05503 Feb 11, 2026
d488649
refactor: ๋จธ์ง€ ์ด์ „ ์ฝ”๋“œ ์ ๊ฒ€
se05503 Feb 11, 2026
8c8cf0e
refactor: ๋จธ์ง€ ์ด์ „ ์ฝ”๋“œ ์ ๊ฒ€
se05503 Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import org.gradle.kotlin.dsl.testRuntimeOnly
import org.gradle.kotlin.dsl.testRuntimeOnly
import java.io.FileInputStream
import java.util.Properties

Expand Down Expand Up @@ -36,12 +36,13 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner = "com.egobook.app.HiltTestRunner"

val baseUrl = localProperties.getProperty("BACKEND_BASE_URL")
buildConfigField("String", "BACKEND_BASE_URL", "\"$baseUrl\"")

val googleClientId = localProperties.getProperty("GOOGLE_WEB_CLIENT_ID")
buildConfigField("String", "GOOGLE_WEB_CLIENT_ID", "\"$googleClientId\"")

val backendBaseUrl = localProperties.getProperty("BACKEND_BASE_URL")
buildConfigField("String", "BACKEND_BASE_URL", "\"$backendBaseUrl\"")
val aiBaseUrl = localProperties.getProperty("AI_BASE_URL")
buildConfigField("String", "AI_BASE_URL", "\"$aiBaseUrl\"")
}

buildTypes {
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/java/com/egobook/app/data/api/AIApiService.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.egobook.app.data.api

import com.egobook.app.data.model.square.letter.DetectAbusiveContentRequest
import com.egobook.app.data.model.square.letter.DetectAbusiveContentResponse
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.POST

interface AIApiService {
@POST("/detect")
suspend fun detectAbusiveContent(@Body request: DetectAbusiveContentRequest): Response<DetectAbusiveContentResponse>
}
66 changes: 57 additions & 9 deletions app/src/main/java/com/egobook/app/data/api/CounselingApiService.kt
Original file line number Diff line number Diff line change
@@ -1,27 +1,75 @@
package com.egobook.app.data.api

import com.egobook.app.data.model.counseling.PraiseMessageResponse
import com.egobook.app.data.model.ApiResponse
import com.egobook.app.data.model.counseling.CounselingNotificationRequest
import com.egobook.app.data.model.counseling.DailyAndWeeklyNotificationResponse
import com.egobook.app.data.model.counseling.DailyPraiseResponse
import com.egobook.app.data.model.counseling.DailyPraisesResponse
import com.egobook.app.data.model.counseling.ReportStyleRequest
import com.egobook.app.data.model.counseling.StatisticsResponse
import com.egobook.app.data.model.counseling.WeeklyReportResponse
import com.egobook.app.data.model.counseling.WeeklyReportsResponse
import com.egobook.app.data.model.counseling.WeeklyReportStyleResponse
import com.egobook.app.domain.model.ReportStyle
import com.egobook.app.domain.model.counseling.WeeklyReportUnlockType
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.PATCH
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface CounselingApiService {
@GET("api/praise/daily")
suspend fun fetchDailyPraise(): Response<List<PraiseMessageResponse>>
@GET("/ego-room/praise/daily")
suspend fun fetchDailyPraises(
@Query("page") page: Int,
@Query("size") size: Int
): ApiResponse<DailyPraisesResponse>

@GET("api/reports/weekly")
suspend fun fetchWeeklyReports(): Response<List<WeeklyReportResponse>>
@GET("/ego-room/praise/daily/{date}")
suspend fun fetchDailyPraiseByDate(
@Path("date") date: String
): Response<DailyPraiseResponse>

@GET("api/reports/weekly/style")
suspend fun fetchWeeklyReportStyle(): Response<WeeklyReportStyleResponse>
@GET("/ego-room/ai/toggle")
suspend fun fetchDailyAndWeeklyNotification(): ApiResponse<DailyAndWeeklyNotificationResponse>

@POST("api/reports/weekly/style")
suspend fun updateWeeklyReportStyle(@Query("style") reportStyle: ReportStyle): Response<Unit>
@PATCH("/ego-room/praise/daily")
suspend fun updateDailyPraiseNotification(
@Body request: CounselingNotificationRequest
): ApiResponse<Unit>

@PATCH("/ego-room/counsel/weekly")
suspend fun updateWeeklyReportNotification(
@Body request: CounselingNotificationRequest
): ApiResponse<Unit>

@GET("/ego-room/counsel/weekly")
suspend fun fetchWeeklyReports(
@Path("page") page: Int,
@Path("size") size: Int
): ApiResponse<WeeklyReportsResponse>

@GET("/ego-room/counsel/weekly/{startDate}")
suspend fun fetchWeeklyReportByDate(
@Path("startDate") startDate: String
): Response<WeeklyReportResponse>

@PATCH("/ego-room/counsel/weekly/next-tone")
suspend fun updateWeeklyReportStyle(
@Body request: ReportStyleRequest
): Response<Unit>

@POST("/ego-room/counsel/weekly/{startDate}/unlock")
suspend fun unlockWeeklyReport(
@Path("startDate") startDate: String,
@Path("unlockType") unlockType: WeeklyReportUnlockType
): ApiResponse<Unit>


@GET("/ego-room/counseling-tone")
suspend fun fetchWeeklyReportStyle(): ApiResponse<ReportStyle>

@GET("api/statistics")
suspend fun fetchStatistics(): Response<StatisticsResponse>
Expand Down
63 changes: 63 additions & 0 deletions app/src/main/java/com/egobook/app/data/api/LetterApiService.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package com.egobook.app.data.api

import com.egobook.app.data.model.ApiResponse
import com.egobook.app.data.model.square.letter.ArrivedPendingLetterResponse
import com.egobook.app.data.model.square.letter.ReplyLetterRequest
import com.egobook.app.data.model.square.letter.ReplyLetterResponse
import com.egobook.app.data.model.square.letter.ReportLetterRequest
import com.egobook.app.data.model.square.letter.SendLetterRequest
import com.egobook.app.data.model.square.letter.SendLetterResponse
import com.egobook.app.data.model.square.letter.SentLetterResponse
import com.egobook.app.data.model.square.letter.SentLetterWithReplyResponse
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface LetterApiService {
@POST("/plaza/letters")
suspend fun sendLetter(@Body request: SendLetterRequest): ApiResponse<SendLetterResponse>

@GET("/plaza/letters/inbox/next")
suspend fun fetchArrivedPendingLetter(): ApiResponse<ArrivedPendingLetterResponse>

@POST("/plaza/letters/{letterId}/reply")
suspend fun replyLetter(
@Path("letterId") letterId: Long,
@Body request: ReplyLetterRequest
): ApiResponse<ReplyLetterResponse>

@POST("/plaza/letters/{letterId}/defer")
suspend fun deferReplyLetter(
@Path("letterId") letterId: Long
): ApiResponse<Unit>

@POST("/plaza/letters/{letterId}/give-up")
suspend fun giveUpReplyLetter(
@Path("letterId") letterId: Long
): ApiResponse<Unit>

@GET("/plaza/letters/sent")
suspend fun fetchSentLetters(
@Query("page") page: Int,
@Query("size") size: Int
): ApiResponse<SentLetterResponse>

@GET("/plaza/letters/{letterId}")
suspend fun fetchSentLetterWithReply(
@Path("letterId") letterId: Long
): ApiResponse<SentLetterWithReplyResponse>

@POST("/plaza/letters/{replyId}/report")
suspend fun reportRepliedLetter(
@Path("replyId") replyId: Long,
@Body request: ReportLetterRequest
): ApiResponse<Unit>

@DELETE("/plaza/letters/threads/{threadId}")
suspend fun deleteLetterThread(
@Path("threadId") threadId: Long
): ApiResponse<Unit>
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.content.Intent
import com.egobook.app.data.api.AuthApiService
import com.egobook.app.data.local.UserInfoStorage
import com.egobook.app.data.model.auth.AccessTokenRequest
import com.egobook.app.di.AuthRetrofit
import com.egobook.app.di.qualifier.AuthRetrofit
import com.egobook.app.ui.login.view.LoginActivity
import dagger.hilt.android.qualifiers.ApplicationContext
import kotlinx.coroutines.flow.first
Expand All @@ -20,7 +20,7 @@ import javax.inject.Inject
class TokenAuthenticator @Inject constructor(
@param:ApplicationContext private val context: Context,
private val userInfoStorage: UserInfoStorage,
@param:AuthRetrofit private val authApiService: AuthApiService
private val authApiService: AuthApiService
) : Authenticator {

override fun authenticate(route: Route?, response: Response): Request? {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.egobook.app.data.model.counseling

import com.google.gson.annotations.SerializedName

data class CounselingNotificationRequest(
@SerializedName("enabled")
val isEnabled: Boolean
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.egobook.app.data.model.counseling

import com.egobook.app.domain.model.counseling.DailyAndWeeklyNotification
import com.google.gson.annotations.SerializedName

data class DailyAndWeeklyNotificationResponse(
@SerializedName("dailyPraiseEnabled")
val isDailyPraiseEnabled: Boolean,
@SerializedName("weeklyAnalysisEnabled")
val isWeeklyAnalysisEnabled: Boolean
)

fun DailyAndWeeklyNotificationResponse.toDomain() = DailyAndWeeklyNotification(
isDailyPraiseEnabled = isDailyPraiseEnabled,
isWeeklyAnalysisEnabled = isWeeklyAnalysisEnabled
)


Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.egobook.app.data.model.counseling

import com.egobook.app.domain.model.counseling.CounselingReward
import com.egobook.app.domain.model.counseling.CounselingRewardType
import com.egobook.app.domain.model.counseling.DailyPraiseDetail
import com.google.gson.annotations.SerializedName

data class DailyPraiseResponse(
@SerializedName("diaryDate")
val diaryDate: String,
@SerializedName("content")
val content: String,
@SerializedName("createdAt")
val createdAt: String,
@SerializedName("isRead")
val isRead: Boolean,
@SerializedName("rewards")
val rewards: List<CounselingRewardResponse>? = null
)

data class CounselingRewardResponse(
@SerializedName("kind")
val kind: CounselingRewardType,
@SerializedName("amount")
val amount: Int,
@SerializedName("toastMessage")
val toastMessage: String
)

fun CounselingRewardResponse.toDomain() = CounselingReward(
kind = kind,
amount = amount,
toastMessage = toastMessage
)

fun DailyPraiseResponse.toDomain() = DailyPraiseDetail(
diaryDate = diaryDate,
content = content,
createdAt = createdAt,
isRead = isRead,
rewards = rewards?.map { it.toDomain() }
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.egobook.app.data.model.counseling

import com.egobook.app.domain.model.counseling.DailyPraise
import com.google.gson.annotations.SerializedName

data class DailyPraisesResponse(
@SerializedName("content")
val content: List<PraiseDailyItemResponse>,
@SerializedName("page")
val page: Int,
@SerializedName("size")
val size: Int,
@SerializedName("hasNext")
val hasNext: Boolean
)

data class PraiseDailyItemResponse(
@SerializedName("id")
val id: Int,
@SerializedName("diaryDate")
val diaryDate: String,
@SerializedName("isRead")
val isRead: Boolean
)

fun PraiseDailyItemResponse.toDomain(): DailyPraise = DailyPraise(
id = id,
diaryDate = diaryDate,
isRead = isRead
)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.egobook.app.data.model.counseling

import com.egobook.app.domain.model.ReportStyle

data class ReportStyleRequest(
val toneStyle: ReportStyle
)
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
package com.egobook.app.data.model.counseling

import com.egobook.app.domain.model.WeeklyReport
import com.egobook.app.domain.model.WeeklyReportContent
import com.egobook.app.domain.model.counseling.WeeklyReportDetail
import com.google.gson.annotations.SerializedName

data class WeeklyReportResponse(
val id: Long,
val date: String,
val content: WeeklyReportContentResponse
)

data class WeeklyReportContentResponse(
val analysis: String,
val praisePoint: String,
val improvement: String,
val management: String,
val encouragement: String
)

fun WeeklyReportResponse.toDomain(): WeeklyReport = WeeklyReport(
id = id,
date = date,
content = WeeklyReportContent(
analysis = content.analysis,
praisePoint = content.praisePoint,
improvement = content.improvement,
management = content.management,
encouragement = content.encouragement
)
@SerializedName("startDate")
val startDate: String,
@SerializedName("endDate")
val endDate: String,
@SerializedName("summary")
val summary: String,
@SerializedName("praisePoints")
val praisePoints: String,
@SerializedName("improvementPoints")
val improvementPoints: String,
@SerializedName("managementAdvice")
val managementAdvice: String,
@SerializedName("supportMessage")
val supportMessage: String,
@SerializedName("isRead")
val isRead: Boolean
)

fun WeeklyReportResponse.toDomain() = WeeklyReportDetail(
startDate = startDate,
endDate = endDate,
summary = summary,
praisePoints = praisePoints,
improvementPoints = improvementPoints,
managementAdvice = managementAdvice,
supportMessage = supportMessage,
isRead = isRead
)
Loading