using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace TEAMModelOS.SDK.Models.Cosmos
{
    public  class Correct: CosmosEntity
    {
        public Correct()
        {
            pk = "Correct";

        }
        /// <summary>
        /// 发布层级 类型 school   
        /// </summary>
        public string owner { get; set; } = "school";
        /// <summary>
        /// 学校编码
        /// </summary>
        [Required(ErrorMessage = "school 必须设置")]
        public string school { get; set; }
        /// <summary>
        /// 阅卷名称
        /// </summary>
        [Required(ErrorMessage = "name 必须设置")]
        public string name { get; set; }
        /// <summary>
        /// 创建者的id 
        /// </summary>
        [Required(ErrorMessage = "creatorId 必须设置")]
        public string creatorId { get; set; }
        /// <summary>
        /// pending 待发布|going 已发布|finish 已结束
        /// </summary>
        //[Required(ErrorMessage = "progress 必须设置")]
        public string progress { get; set; }
        /// <summary>
        /// school 
        /// </summary>
        [Required(ErrorMessage = "scope 必须设置")]
        public string scope { get; set; } = "school";
        /// <summary>
        /// 开始时间
        /// </summary>
        public long startTime { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public long createTime { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public long endTime { get; set; }
    
        public int? status { get; set; } = 0;
        /// <summary>
        /// 评测的分区键code值
        /// </summary>
        public string scode { get; set; }
        public List<CorSub> subs { get; set; } = new List<CorSub>();
        /// <summary>
        /// 阅卷模式,qu按题目，full按人/学生
        /// </summary>
        public string mode { get; set; }
        /// <summary>
        /// 阅卷次数
        /// </summary>
        public int num { get; set; } = 1;
        /// <summary>
        /// 是否有异常处理流程 0/1
        /// </summary>
        public int isErr { get; set; }
        /// <summary>
        /// 是否有仲裁处理流程 0/1
        /// </summary>
        public int isArb { get; set; }
    }

    public class CorSub{
        /// <summary>
        /// 科目名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 科目id
        /// </summary>
        public string id { get; set; }
        /// <summary>
        /// 参与阅卷教师醍摩豆id
        /// </summary>
        public List<CorTmd> markers { get; set; } = new List<CorTmd>();
        /// <summary>
        /// 异常卷处理人员
        /// </summary>
        public List<string> err { get; set; } = new List<string>() ;
        /// <summary>
        /// 仲裁卷处理人员
        /// </summary>
        public List<string> arb { get; set; } = new List<string>() ;
        /// <summary>
        /// 分差（仲裁条件）
        /// </summary>
        ///public double point { get; set; }
       
    }
    public class CorTmd{
        /// <summary>
        /// tmdid
        /// </summary>
        public string id { get; set; }
        /// <summary>
        /// tmdid名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 任务量
        /// </summary>
        public int count { get; set; }
        /// <summary>
        /// 题目分配规则
        /// </summary>
        public List<string> qu { get; set; }
    }
}
