create a table for widgets

This commit is contained in:
tibbi
2018-11-07 12:25:47 +01:00
parent e7ff0c6e15
commit d0e731fcb7
6 changed files with 36 additions and 4 deletions

View File

@ -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)