using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using TEAMModelOS.SDK.Context.Attributes.Azure;


namespace TEAMModelOS.SDK.Models
{
    /// <summary>
    /// 试卷信息
    /// </summary>    
    public class Paper : CosmosEntity
    {
        public Paper()
        {
            pk = "Paper";
            //item = new List<ItemInfo>();
            scoring = new List<MarkConfig>();
        }
        
        /// <summary>
        /// 试卷的基本信息
        /// </summary>
        public string blob { get; set; }
        /// <summary>
        /*/// 题目信息
        /// </summary>
        public List<ItemInfo> item { get; set; }*/
        /// <summary>
        /// 科目
        /// </summary>
        public string subjectId { get; set; }
        public string subjectName { get; set; }
        /// <summary>
        /// 学段
        /// </summary>
        public string periodId { get; set; }
        /// <summary>
        /// 年级
        /// </summary>
        public List<string> gradeIds { get; set; }

        /// <summary>
        /// 试卷名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 引用次数
        /// </summary>
        public int useCount { get; set; }
        /// <summary>
       /* /// 题目难度
        /// </summary>
        public double level { get; set; }*/
        /// <summary>
        /// 总分
        /// </summary>
        public double score { get; set; }
        public string scope { get; set; }
        public int multipleRule { get; set; }
        //记录试卷大小
        public long? size { get; set; } = 0;
        /// <summary>
        /// type:{
        ///     pointkey:[num1,num2....]
        /// }
        /// 题型的分数占比
        /// </summary>
     /* 
        public Dictionary<string, ScoreCount> typeScore { get; set; }
        /// <summary>
        /// 题目难度分数占比
        /// </summary>
        public Dictionary<string, ScoreCount> levelScore { get; set; }
        /// <summary>
        /// 知识点分数占比
        /// </summary>
        public Dictionary<string, ScoreItem> pointScore { get; set; }*/
        /// <summary>
        /// 创建时间
        /// </summary>
        public long createTime { get; set; }
        /*  /// <summary>
          /// 正确答案
          /// </summary>
          public List<Answer> answers { get; set; }*/
        /// <summary>
        /// 阅卷规则
        /// </summary>
        public List<MarkConfig> scoring { get; set; }
        /// <summary>
       /* /// 题目集合
        /// </summary>
        public List<string> itemids { get; set; }*/
    }
    /// <summary>
    /// 阅卷规则
    /// </summary>
    public class MarkConfig
    {
        /// <summary>
        /// 作答
        /// </summary>
        public List<string> ans { get; set; }
        /// <summary>
        /// 题目类型
        /// </summary>
        public string type { get; set; }
        /// <summary>
        /// 多选漏选指定得分
        /// </summary>
        public double? score { get; set; } = 0;
    }
    /*
    public class ScoreItem
    {
        public ScoreItem()
        {
          item = new List<int>();
        }
        public double score { get; set; }
        public List<int> item { get; set; }
    }
    public class ScoreCount{
         
        public double score { get; set; }
        public int count { get; set; }
    }*/
}
