mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor messages to Room database
This commit is contained in:
parent
ab7bf4922b
commit
65e982ddd5
12 changed files with 191 additions and 279 deletions
|
|
@ -4,16 +4,13 @@ import androidx.room.ColumnInfo
|
|||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import com.geeksville.mesh.DataPacket
|
||||
import com.geeksville.mesh.MessageStatus
|
||||
|
||||
@Entity(tableName = "packet")
|
||||
data class Packet(
|
||||
@PrimaryKey(autoGenerate = true) val uuid: Long,
|
||||
@ColumnInfo(name = "port_num") val port_num: Int,
|
||||
@ColumnInfo(name = "contact_id") val contact_id: String?,
|
||||
@ColumnInfo(name = "channel") val channel: Int,
|
||||
@ColumnInfo(name = "status") val status: MessageStatus = MessageStatus.UNKNOWN,
|
||||
@ColumnInfo(name = "contact_key") val contact_key: String,
|
||||
@ColumnInfo(name = "received_time") val received_time: Long,
|
||||
@ColumnInfo(name = "packet") val packet: DataPacket
|
||||
@ColumnInfo(name = "data") val data: DataPacket
|
||||
) {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue