Jetpack
data class Jetpack(val id: String = UUID.randomUUID().toString(), val name: String = String(), val price: Double = 0.0, val lastUpdated: Long = System.currentTimeMillis(), val lastSynced: Long = 0, val needsSync: Boolean = true, val formattedDate: String = lastUpdated.asFormattedDateTime())(source)
Home item exposed by the repository after mapping Room data.
Room supplies observed content; this model is not a separate persistence store.
Parameters
id
Item ID shared with local and remote storage.
name
Display name.
price
Numeric price.
lastUpdated
Edit time in epoch milliseconds, carried from the writing device.
lastSynced
Epoch milliseconds carried from local acknowledgement or remote mapping. It is not an acknowledgement of the current form's persistence.
needsSync
Local pending flag; the DAO also compares edit and acknowledgement times.
formattedDate
Display text derived from Jetpack.lastUpdated.
See also
Constructors
Functions
Link copied to clipboard
Extension function to map a Jetpack to a FirebaseJetpack.
Link copied to clipboard
Extension function to map a Jetpack to a JetpackEntity.