package com.craigvg.lichun_android.domain.models import kotlinx.serialization.Serializable /** * Life goals progression delivered via the `lifeGoalsUpdate` message. * * Wave 1 decodes + stores this so the long-arc progression survives in state; * Wave 2 (T015b) builds the dedicated goals UI. Field names mirror the server * `formatActiveGoals` / `formatCompletedGoals` / `sendLifeGoalsUpdate` payloads * (server/src/services/retention/lifeGoals.ts + integration.ts). */ @Serializable data class LifeGoalsState( val active: List = emptyList(), val completed: List = emptyList(), val lifeScore: Int = 0, /** Goals that completed on the most recent update (drives a one-time toast/celebration). */ val justCompleted: List = emptyList() ) /** An in-progress life goal merged with its live definition. */ @Serializable data class ActiveLifeGoal( val id: String = "", val title: String = "", val description: String = "", val icon: String = "star", val target: Int = 1, val reward: Int = 0, val lifeScore: Int = 0, val current: Int = 0, val progressPercent: Int = 0 ) /** A completed life goal (server merges in title + icon). */ @Serializable data class CompletedLifeGoal( val id: String = "", val completedAt: String = "", val title: String = "", val icon: String = "star" ) /** A goal that just completed this update tick. */ @Serializable data class JustCompletedLifeGoal( val id: String = "", val title: String = "", val description: String = "", val icon: String = "star", val reward: Int = 0, val lifeScore: Int = 0 )