mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: support for switching between devices (#1078)
This commit is contained in:
parent
9ba44ad087
commit
5b3c78316b
16 changed files with 934 additions and 206 deletions
|
|
@ -2,15 +2,26 @@ package com.geeksville.mesh.database.entity
|
|||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.Index
|
||||
import androidx.room.PrimaryKey
|
||||
import com.geeksville.mesh.DataPacket
|
||||
|
||||
@Entity(tableName = "packet")
|
||||
@Entity(
|
||||
tableName = "packet",
|
||||
indices = [
|
||||
Index(value = ["myNodeNum"]),
|
||||
Index(value = ["port_num"]),
|
||||
Index(value = ["contact_key"]),
|
||||
]
|
||||
)
|
||||
|
||||
data class Packet(
|
||||
@PrimaryKey(autoGenerate = true) val uuid: Long,
|
||||
@ColumnInfo(name = "myNodeNum", defaultValue = "0") val myNodeNum: Int,
|
||||
@ColumnInfo(name = "port_num") val port_num: Int,
|
||||
@ColumnInfo(name = "contact_key") val contact_key: String,
|
||||
@ColumnInfo(name = "received_time") val received_time: Long,
|
||||
@ColumnInfo(name = "read", defaultValue = "1") val read: Boolean,
|
||||
@ColumnInfo(name = "data") val data: DataPacket
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue