JetpackEntity

data class JetpackEntity(val id: String = UUID.randomUUID().toString(), val name: String, val price: Double, val userId: String = String(), val lastUpdated: Long = 0, val lastSynced: Long = 0, val serverUpdatedAtNanos: Long = 0, val needsSync: Boolean = false, val deleted: Boolean = false, val syncAction: SyncAction = SyncAction.NONE)(source)

Room row containing Home content and local sync metadata.

The repository sets pending metadata on local writes; entity construction alone does not schedule work. Pulled rows carry remote content/timestamps and default to no pending action. Acknowledgement clears pending flags by ID, without a version check. Deleted rows remain locally after remote acknowledgement; no automatic cleanup is implemented.

See also

Constructors

Link copied to clipboard
constructor(id: String = UUID.randomUUID().toString(), name: String, price: Double, userId: String = String(), lastUpdated: Long = 0, lastSynced: Long = 0, serverUpdatedAtNanos: Long = 0, needsSync: Boolean = false, deleted: Boolean = false, syncAction: SyncAction = SyncAction.NONE)

Properties

Link copied to clipboard

Soft-delete flag excluding the row from the normal list query.

Link copied to clipboard
val id: String

Primary key shared with the remote document.

Link copied to clipboard

Epoch milliseconds set during upload and local acknowledgement, and also carried from remote mappings. Not a guarantee that the current content was uploaded.

Link copied to clipboard

Edit time in epoch milliseconds from the writing device. Used for list ordering and comparison with JetpackEntity.lastSynced when selecting pending rows.

Link copied to clipboard

Display name.

Link copied to clipboard

Explicit pending-change flag used alongside the timestamp comparison.

Link copied to clipboard

Numeric price; the entity itself does not enforce a range.

Link copied to clipboard

Server write time in epoch nanoseconds copied from a pull, or zero before such a timestamp is stored. Used by the timestamp-only pull cursor.

Link copied to clipboard

Remote operation selected for a pending row.

Link copied to clipboard

Owner used by user-scoped list, pending, and cursor queries.