35 lines
1.1 KiB
Kotlin
35 lines
1.1 KiB
Kotlin
package app.closer.domain.model
|
|
|
|
/**
|
|
* A partner's private post-date reflection (3 prompts). The content is couple-key encrypted and lives in
|
|
* a read-gated `secure/payload` subdoc — neither partner can read the other's until BOTH have reflected
|
|
* (enforced by the Firestore rule, mirroring the daily-question reveal). Privacy-native by design.
|
|
*/
|
|
data class DateReflection(
|
|
val dateId: String = "",
|
|
val userId: String = "",
|
|
val favoriteMoment: String = "",
|
|
val surprise: String = "",
|
|
val appreciated: String = "",
|
|
val isRevealed: Boolean = false,
|
|
val createdAt: Long = 0L,
|
|
val schemaVersion: Int = SCHEMA_VERSION
|
|
) {
|
|
val isEmpty: Boolean
|
|
get() = favoriteMoment.isBlank() && surprise.isBlank() && appreciated.isBlank()
|
|
|
|
companion object {
|
|
const val SCHEMA_VERSION = 1
|
|
}
|
|
}
|
|
|
|
/** Per-user reflection progress for a completed date, derived at read time (not stored). */
|
|
enum class DateReflectionState {
|
|
/** Neither this user has reflected. */
|
|
NONE,
|
|
/** This user reflected; waiting on the partner. */
|
|
AWAITING_PARTNER,
|
|
/** Both reflected — ready to reveal / revealed. */
|
|
BOTH_DONE
|
|
}
|