mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
create a table for widgets
This commit is contained in:
@ -1,3 +1,12 @@
|
||||
package com.simplemobiletools.notes.pro.models
|
||||
|
||||
data class Widget(var widgetId: Int, var noteId: Int)
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.Index
|
||||
import androidx.room.PrimaryKey
|
||||
|
||||
@Entity(tableName = "widgets", indices = [(Index(value = ["widget_id"], unique = true))])
|
||||
data class Widget(
|
||||
@PrimaryKey(autoGenerate = true) var id: Int?,
|
||||
@ColumnInfo(name = "widget_id") var widgetId: Int,
|
||||
@ColumnInfo(name = "note_id") var noteId: Int)
|
||||
|
Reference in New Issue
Block a user