feat(date-memories): add DateReflection domain model

This commit is contained in:
null 2026-06-30 18:13:48 -05:00
parent 9a92b2b020
commit de597f6238
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
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
}