package ru.soune.nocopy.dto.statistic;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SubscriberStatisticResponse {

    @JsonProperty("monthly")
    private PeriodStatistics monthly;

    @JsonProperty("yearly")
    private PeriodStatistics yearly;

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class PeriodStatistics {

        @JsonProperty("current_active_subscriptions")
        private Long currentActiveSubscriptions;

        @JsonProperty("first_time_subscriptions")
        private Long firstTimeSubscriptions;

        @JsonProperty("renewals")
        private Long renewals;

        @JsonProperty("upgrades")
        private Long upgrades;

        @JsonProperty("downgrades")
        private Long downgrades;
    }
}
