Skip to content

Instantly share code, notes, and snippets.

@hieuwu
Last active March 21, 2022 14:37
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 hieuwu/a9ec68116e55627d558cb49eb462b5af to your computer and use it in GitHub Desktop.
Save hieuwu/a9ec68116e55627d558cb49eb462b5af to your computer and use it in GitHub Desktop.
Product Entity
@Entity(tableName = "products")
data class Product(
@PrimaryKey
@NonNull
@ColumnInfo(name = "productId")
val id: String,
@ColumnInfo(name = "name")
var name: String?,
@ColumnInfo(name = "price")
var price: Double
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment