Skip to content

Instantly share code, notes, and snippets.

@manijshrestha
Last active June 3, 2017 04:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manijshrestha/91dd2aa37d9c262160c686c3b5843dad to your computer and use it in GitHub Desktop.
Save manijshrestha/91dd2aa37d9c262160c686c3b5843dad to your computer and use it in GitHub Desktop.
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