using System;
using System.Collections.Generic;

namespace AssortValidator.Common.Models
{
    public class AssortRoot
    {
        public int err { get; set; }
        public object errmsg { get; set; }
        public Assort data { get; set; }
    }

    public class Assort
    {
        public Assort()
        {
            items = new List<Item>();
            barter_scheme = new Dictionary<string, List<List<BarterDetails>>>();
            loyal_level_items = new Dictionary<string, int>();
        }

        public int nextResupply { get; set; }
        public List<Item> items { get; set; }
        public Dictionary<string, List<List<BarterDetails>>> barter_scheme { get; set; }
        public Dictionary<string, int> loyal_level_items { get; set; }

        public class BarterDetails
        {
            public double count { get; set; }
            public string _tpl { get; set; }
        }

        public class Item
        {
            public string _id { get; set; }
            public string _tpl { get; set; }
            public string ItemName { get; set; }
            public string parentId { get; set; }
            public string slotId { get; set; }
            public Upd upd { get; set; }
        }

        public class Upd
        {
            public int? BuyRestrictionMax { get; set; }
            public int? BuyRestrictionCurrent { get; set; }
            public int? StackObjectsCount { get; set; }
            public bool? UnlimitedCount { get; set; }
        }
    }
}