Skip to content

Instantly share code, notes, and snippets.

@DenisBronx
Created September 3, 2019 22:56
Show Gist options
  • Save DenisBronx/4459fe1a19eb4514c828a729721ba116 to your computer and use it in GitHub Desktop.
Save DenisBronx/4459fe1a19eb4514c828a729721ba116 to your computer and use it in GitHub Desktop.
Repository Pattern Mixed DTO
@Entity(tableName = "Product")
data class ProductDTO(
@PrimaryKey
@ColumnInfo(name = "id")
@SerializedName("id")
val id: String?,
@ColumnInfo(name = "name")
@SerializedName("name")
val name: String?,
@ColumnInfo(name = "nowPrice")
@SerializedName("nowPrice")
val nowPrice: Double?,
@ColumnInfo(name = "wasPrice")
@SerializedName("wasPrice")
val wasPrice: Double?
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment