using System;
using System.Collections.Generic;
using System.Text;

namespace TEAMModelOS.SDK.Models
{
    /// <summary>
    /// 题目数量统计
    /// </summary>
    public class ItemCond : CosmosEntity
    {
        public ItemCond()
        {
            pk = "ItemCond";
        }
        public int count { get; set; }
        public List<GradeCount> grades { get; set; } = new List<GradeCount>();

        public List<SubjectCount> subjects { get; set; } = new List<SubjectCount>();

        
        //key  学段id-科目id
        //  public Dictionary<string, List<CondCount>> subjects { get; set; } = new Dictionary<string, List<CondCount>>();
    }
    //public class CondCount {
    //    public KeyValuePair<string, int> grade { get; set; } = new KeyValuePair<string, int>();
    //    public Dictionary<string, int> type { get; set; } = new Dictionary<string, int>();
    //    public Dictionary<int, int> level { get; set; } = new Dictionary<int, int>();
    //    public Dictionary<int, int> field { get; set; } = new Dictionary<int, int>();
    //}

    public class SubjectCount
    {
        public string id { get; set; }
        public int count { get; set; }
        public Dictionary<string, Dictionary<string, Dictionary<string, int>>> types { get; set; } = new Dictionary<string, Dictionary<string, Dictionary<string, int>>>()
        {
            {
                "compose",new Dictionary<string, Dictionary<string, int>>
                {
                    { 
                        "level",new Dictionary<string, int> 
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }
                        } 
                    },
                    {
                        "field",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }, { "6", 0 }
                        }
                    }
                }
            },
            {
                "single",new Dictionary<string, Dictionary<string, int>>
                {
                    {
                        "level",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }
                        }
                    },
                    {
                        "field",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }, { "6", 0 }
                        }
                    }
                }
            },
            {
                "multiple",new Dictionary<string, Dictionary<string, int>>
                {
                    {
                        "level",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }
                        }
                    },
                    {
                        "field",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }, { "6", 0 }
                        }
                    }
                }
            },
            {
                "sortmultiple",new Dictionary<string, Dictionary<string, int>>
                {
                    {
                        "level",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }
                        }
                    },
                    {
                        "field",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }, { "6", 0 }
                        }
                    }
                }
            },
            {
                "judge",new Dictionary<string, Dictionary<string, int>>
                {
                    {
                        "level",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }
                        }
                    },
                    {
                        "field",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }, { "6", 0 }
                        }
                    }
                }
            },
            {
                "complete",new Dictionary<string, Dictionary<string, int>>
                {
                    {
                        "level",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }
                        }
                    },
                    {
                        "field",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }, { "6", 0 }
                        }
                    }
                }
            },
            {
                "subjective",new Dictionary<string, Dictionary<string, int>>
                {
                    {
                        "level",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }
                        }
                    },
                    {
                        "field",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }, { "6", 0 }
                        }
                    }
                }
            },
            {
                "connector",new Dictionary<string, Dictionary<string, int>>
                {
                    {
                        "level",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }
                        }
                    },
                    {
                        "field",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }, { "6", 0 }
                        }
                    }
                }
            },
            {
                "correct",new Dictionary<string, Dictionary<string, int>>
                {
                    {
                        "level",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }
                        }
                    },
                    {
                        "field",new Dictionary<string, int>
                        {
                            { "1",0},{ "2",0}, { "3", 0 }, { "4", 0 }, { "5", 0 }, { "6", 0 }
                        }
                    }
                }
            }
        };
    }


    public class GradeCount
    {
        public string id { get; set; }
        public int count { get; set; }
    }
}
