package com.caliverse.admin.dynamodb.domain.doc;

import com.caliverse.admin.global.common.constants.DynamoDBConstants;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.Setter;
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbAttribute;
import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean;

@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@DynamoDbBean
public class RankerDoc extends DynamoDBDocBase {
    private String attrib;
    @Setter
    private long ttl;

    public String getAttribFieldName() {
        return DynamoDBConstants.ATTRIB_RANKER;
    }

    @DynamoDbAttribute(DynamoDBConstants.ATTRIB_RANKER)
    @JsonProperty(DynamoDBConstants.ATTRIB_RANKER)
    public String getAttribValue() {
        return attrib;
    }

    public void setAttribValue(String value) {
        this.attrib = value;
    }
}

