Skip to content

Instantly share code, notes, and snippets.

@hieuwu
Last active March 21, 2022 14:41
Show Gist options
  • Save hieuwu/19295ec6898492f59d5d656f63b009c1 to your computer and use it in GitHub Desktop.
Save hieuwu/19295ec6898492f59d5d656f63b009c1 to your computer and use it in GitHub Desktop.
Line item entity
@Entity(tableName = "line_items")
data class LineItem(
@PrimaryKey(autoGenerate = true)
@ColumnInfo(name = "lineItemId")
val id: Long,
@ColumnInfo(name = "productId")
val productId: String,
@ColumnInfo(name = "orderId")
val orderId: String,
@ColumnInfo(name = "quantity")
var quantity: Int,
@ColumnInfo(name = "subtotal")
var subtotal: Double,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment