Skip to content

Instantly share code, notes, and snippets.

@yairzaslavsky
Last active August 18, 2020 18:58
Show Gist options
  • Save yairzaslavsky/486a66871c57bf23629a812320abf697 to your computer and use it in GitHub Desktop.
Save yairzaslavsky/486a66871c57bf23629a812320abf697 to your computer and use it in GitHub Desktop.
Person.kt
@DynamoDBTable(tableName = "Person")
data class Person(
@DynamoDBHashKey(attributeName = "personId")
var personId: String = "",
@DynamoDBAttribute(attributeName = "name")
var name: String = "",
@DynamoDBIndexHashKey(globalSecondaryIndexName = "familyName-index", attributeName = "familyName")
var familyName: String = "",
@DynamoDBAttribute(attributeName = "createdTime")
var createdTime: Long = Instant.now().epochSecond,
@DynamoDBAttribute(attributeName = "lastUpdateTime")
var lastUpdatedTime: Long = Instant.now().epochSecond
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment