diff --git a/app/src/main/java/app/closer/domain/model/DateReflection.kt b/app/src/main/java/app/closer/domain/model/DateReflection.kt new file mode 100644 index 00000000..9df63a1d --- /dev/null +++ b/app/src/main/java/app/closer/domain/model/DateReflection.kt @@ -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 +}