Skip to content

Instantly share code, notes, and snippets.

@manijshrestha

manijshrestha/Task.kt

Last active Jun 3, 2017
Embed
What would you like to do?
import android.arch.persistence.room.ColumnInfo
import android.arch.persistence.room.Entity
import android.arch.persistence.room.PrimaryKey
@Entity(tableName = "task")
data class Task(@ColumnInfo(name = "completed_flag") var completed: Boolean = false,
@ColumnInfo(name = "task_desciption") var description: String) {
@ColumnInfo(name = "id")
@PrimaryKey(autoGenerate = true) var id: Long = 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.