Hamza GATTAL
07/15/2026, 6:00 PMHamza GATTAL
07/15/2026, 6:03 PMimport androidx.room3.Entity
import androidx.room3.Fts5
import androidx.room3.Index
import androidx.room3.PrimaryKey
import kotlin.time.Instant
@Entity(
tableName = "notes",
indices = [
Index(value = ["archived", "deletedAt", "pinned", "updatedAt"]),
Index(value = ["deletedAt"])
]
)
data class NoteEntity(
@PrimaryKey(autoGenerate = true)
val id: Long = 0L,
val title: String,
val content: String,
val pinned: Boolean = false,
val archived: Boolean = false,
val backgroundColor: Int? = null,
val createdAt: Instant,
val updatedAt: Instant,
val deletedAt: Instant? = null
)
@Entity(tableName = "notes_fts")
@Fts5(contentEntity = NoteEntity::class)
data class NoteFtsEntity(
val title: String,
val content: String
)Hamza GATTAL
07/15/2026, 6:04 PMPablichjenkov
07/15/2026, 6:16 PMChrimaeon
07/17/2026, 2:56 PM• Please refrain from cross-posting the same message on multiple channels. It is considered spamming.https://kotlinlang.org/docs/slack-code-of-conduct.html#basic-usage-guidelines