package com.caliverse.admin.domain.response;

import com.caliverse.admin.Indicators.entity.*;
import com.caliverse.admin.domain.entity.log.GenericLog;
import com.caliverse.admin.logs.Indicatordomain.GenericMongoLog;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class LogResponse {
    private int status;

    private String result;
    @JsonProperty("data")

    private ResultData resultData;

    @Data
    @Builder
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class ResultData {

        private String message;

        @JsonProperty("generic_list")
//        private List<Map<String, Object>> genericList;
        private List<GenericLog> genericList;
        @JsonProperty("currency_list")
        private List<currencyLog> currencyList;
        @JsonProperty("currency_detail_list")
        private List<CurrencyDetailLogInfo> currencyDetailList;
        @JsonProperty("user_create_list")
        private List<UserCreateLogInfo> userCreateList;
        @JsonProperty("user_login_list")
        private List<UserLoginDetailLogInfo> userLoginList;
        @JsonProperty("item_detail_list")
        private List<ItemDetailLogInfo> itemDetailList;
        @JsonProperty("currency_item_list")
        private List<CurrencyItemLogInfo> currencyItemList;
        @JsonProperty("snapshot_list")
        private List<SnapshotLogInfo> snapshotList;

        private int total;
        @JsonProperty("total_all")
        private int totalAll;
        @JsonProperty("page_no")
        private int pageNo;
    }

    @Data
    @Builder
    public static class currencyLog {
        private String logDay;
        private String accountId;
        private String userGuid;
        private String userNickname;
        private Double sapphireAcquired;
        private Double sapphireConsumed;
        private Double sapphireNet;
        private Double goldAcquired;
        private Double goldConsumed;
        private Double goldNet;
        private Double caliumAcquired;
        private Double caliumConsumed;
        private Double caliumNet;
        private Double beamAcquired;
        private Double beamConsumed;
        private Double beamNet;
        private Double rubyAcquired;
        private Double rubyConsumed;
        private Double rubyNet;
        private Integer totalCurrencies;
    }

    @Data
    @Builder
    public static class itemLog {
        private String logDay;
        private String accountId;
        private String userGuid;
        private String userNickname;
        private Double sapphireAcquired;
        private Double sapphireConsumed;
        private Double sapphireNet;
        private Double goldAcquired;
        private Double goldConsumed;
        private Double goldNet;
        private Double caliumAcquired;
        private Double caliumConsumed;
        private Double caliumNet;
        private Double beamAcquired;
        private Double beamConsumed;
        private Double beamNet;
        private Double rubyAcquired;
        private Double rubyConsumed;
        private Double rubyNet;
        private Integer totalCurrencies;
    }

}
