Skip to content

Instantly share code, notes, and snippets.

@markchristopherng
Created April 11, 2018 01:54
Show Gist options
  • Save markchristopherng/2862195cc56a8ffe3b3971c7f7554140 to your computer and use it in GitHub Desktop.
Save markchristopherng/2862195cc56a8ffe3b3971c7f7554140 to your computer and use it in GitHub Desktop.
Room Entity with Parceler
@Entity(tableName = "branch_location")
@SuppressLint("ParcelCreator")
data class BranchLocation @ParcelConstructor constructor (@PrimaryKey(autoGenerate = true) var id : Int,
@ColumnInfo(name = "postcode") var postcode : String?,
@ColumnInfo(name = "locality") var locality : String?,
@ColumnInfo(name = "state") var state : String?,
@ColumnInfo(name = "delivery") var delivery : String? = null,
@ColumnInfo(name = "category") var category : String?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment