Last active
August 18, 2020 18:58
-
-
Save yairzaslavsky/486a66871c57bf23629a812320abf697 to your computer and use it in GitHub Desktop.
Person.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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