package com.smyhub.infogenie.infogeniebackendjava.dto.response;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.Map;

/**
 * Response for GET /api/site/feature-card-clicks.
 * { "section": "...", "counts": { "itemId": 42, ... } }
 *
 * Increment response also includes "item_id" and "count" fields.
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class FeatureClickResponse {

    private String section;

    /** Map of itemId → clickCount, used by the GET endpoint. */
    private Map<String, Long> counts;

    /** Single incremented item_id, used by the POST increment endpoint. */
    @JsonProperty("item_id")
    private String itemId;

    /** Updated click count after increment. */
    private Long count;
}
