Skip to content

Instantly share code, notes, and snippets.

@billydh
Created November 10, 2020 09:49
Show Gist options
  • Select an option

  • Save billydh/59bfaf8f44d9991212c616076747b429 to your computer and use it in GitHub Desktop.

Select an option

Save billydh/59bfaf8f44d9991212c616076747b429 to your computer and use it in GitHub Desktop.
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.*
@DynamoDbBean
data class Account(
@get:DynamoDbPartitionKey var accountId: String? = null,
@get:DynamoDbSortKey var creationTimestampEpoch: Long? = null,
@get:DynamoDbSecondaryPartitionKey(indexNames = ["accountByCustomerId"]) var customerId: String? = null,
@get:DynamoDbSecondarySortKey(indexNames = ["accountByCustomerId"]) var amount: Double? = null,
var accountType: String? = null
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment