mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-18 03:17:03 +05:30
Update TodoItem for Room
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
0b5d7a1624
commit
5ce951d599
1 changed files with 11 additions and 1 deletions
|
@ -1,6 +1,16 @@
|
||||||
package dev.msfjarvis.todo.data.model
|
package dev.msfjarvis.todo.data.model
|
||||||
|
|
||||||
import androidx.compose.runtime.Immutable
|
import androidx.compose.runtime.Immutable
|
||||||
|
import androidx.room.Entity
|
||||||
|
import androidx.room.PrimaryKey
|
||||||
|
import java.time.LocalDateTime
|
||||||
|
import java.time.ZoneId
|
||||||
|
|
||||||
@Immutable
|
@Immutable
|
||||||
data class TodoItem(val title: String)
|
@Entity(
|
||||||
|
tableName = "todo_items",
|
||||||
|
)
|
||||||
|
data class TodoItem(
|
||||||
|
@PrimaryKey val title: String,
|
||||||
|
val time: LocalDateTime = LocalDateTime.now(ZoneId.of("GMT")),
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue