package com.caliverse.admin.domain.response;

import com.caliverse.admin.domain.entity.ITEMLARGETYPE;
import com.caliverse.admin.dynamodb.domain.doc.ItemDoc;
import com.caliverse.admin.dynamodb.entity.EInvenEquipType;
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 ItemsResponse {
    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;

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

        @JsonProperty("list")
        private List<Item> itemList;

        private int totalCnt;
        private int resolve;
        private int unresolve;
        private String rate;
        private Map<String,String> pageKey;
    }

    @Data
    @Builder
    public static class Item{
        private String id;
        @JsonProperty("user_guid")
        private String userGuid;
        @JsonProperty("item_guid")
        private String itemGuid;
        @JsonProperty("item_id")
        private Integer itemId;
        @JsonProperty("item_name")
        private String itemName;
        private Integer count;
        private Integer level;
        @JsonProperty("equip_type")
        private EInvenEquipType equipType;
        @JsonProperty("equiped_pos")
        private Integer equipedPos;
        @JsonProperty("item_type")
        private ITEMLARGETYPE itemType;
        @JsonProperty("create_dt")
        private String createDt;
    }

}
