package com.caliverse.admin.logs.Indicatordomain;

import com.caliverse.admin.global.common.constants.AdminConstants;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

@Document(collection = AdminConstants.MONGO_DB_COLLECTION_LOG)
@Getter
@Setter
public class ItemMongoLog extends MongoLogSearchBase{
    private Integer totalItems;
    private List<ItemDetail> itemDetails;
    private List<ItemTypeLargeStat> itemTypeLargeStats;

    @Data
    @Builder
    public static class ItemDetail {
        private String tranId;
        private String logTime;
        private List<Item> items;
    }

    @Data
    @Builder
    public static class Item {
        private Integer itemMID;
        private String itemName;
        private String action;
        private String itemTypeLarge;
        private String itemTypeSmall;
        private String countDeltaType;
        private Integer deltaCount;
        private Integer stackCount;
        private String itemPK;
        private String itemSK;
    }

    @Data
    @Builder
    public static class ItemTypeLargeStat {
        private String type;
        private Integer acquired;
        private Integer consumed;
    }
}
