Untitled

 avatar
unknown
plain_text
2 months ago
984 B
7
Indexable
@AllArgsConstructor
@Builder
@Data
@DynamoDBTable(tableName = "notes")
public class NotesEntity {
    @DynamoDBHashKey
    @DynamoDBAutoGeneratedKey
    private final String notesId;

    @DynamoDBAttribute(attributeName = "resourceId")
    @DynamoDBIndexHashKey(globalSecondaryIndexName = "resourceId-index")
    @NonNull
    private final String resourceId;

    @DynamoDBAttribute(attributeName = "resourceType")
    @DynamoDBIndexHashKey(globalSecondaryIndexName = "resourceType-index")
    @NonNull
    private final String resourceType;

    @NonNull
    private final String notes;

    @DynamoDBAttribute(attributeName = "author")
    @DynamoDBIndexHashKey(globalSecondaryIndexName = "author-index")
    @NonNull
    private final String author;

    private final Map<String, String> context;

    @DynamoDBAttribute(attributeName = "createDateTime")
    @DynamoDBAutoGeneratedTimestamp(strategy = DynamoDBAutoGenerateStrategy.CREATE)
    private final Long createDateTime;
}
Leave a Comment