using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using TEAMModelOS.SDK.Context.Attributes.Azure;
using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
namespace TEAMModelOS.Service.Models
{
///
/// 试卷信息
///
[CosmosDB(RU = 400, Name = "School")]
public class Paper : ID
{
///
/// 学校编码,个人编码,考试编码
///
[PartitionKey]
[Required(ErrorMessage = "{0} 必须填写")]
public string code { get; set; }
public string pk { get; set; }
public int? ttl { get; set; }
public Paper() {
item = new List();
markConfig = new MarkConfig();
}
[JsonProperty(PropertyName = "id")]
public string id { get; set; }
///
/// 试卷的基本信息
///
public string url { get; set; }
///
/// 题目信息
///
public List item { get; set; }
///
/// 科目
///
public string subjectCode { get; set; }
///
/// 学段
///
public string periodCode { get; set; }
///
/// 年级
///
public List gradeCode { get; set; }
///
/// 试卷名称
///
public string name { get; set; }
///
/// 题目总数
///
public int itemCount { get; set; }
///
/// 题目难度
///
public double level { get; set; }
///
/// 总分
///
public double score { get; set; }
///
/// type:{
/// pointkey:[num1,num2....]
/// }
/// 题型的分数占比
///
public Dictionary typeScore { get; set; }
///
/// 题目难度分数占比
///
public Dictionary levelScore { get; set; }
///
/// 知识点分数占比
///
public Dictionary pointScore { get; set; }
///
/// 创建时间
///
public long createTime { get; set; }
///
/// 正确答案
///
public List answers { get; set; }
///
/// 阅卷规则
///
public MarkConfig markConfig { get; set; }
}
///
/// 阅卷规则
///
public class MarkConfig
{
///
/// 客观题是否自动阅卷
///
public bool auto { get; set; } = true;
///
/// 多选 0不允许自动阅卷,1多选漏选不得分,2多选漏选得一半的分数(默认),3多选漏选按选择个数得分,4多选漏选指定分数
///
public int type { get; set; } = 3;
///
/// 多选漏选指定得分
///
public double? score { get; set; } = 0;
}
public class ScoreItem
{
public ScoreItem()
{
item = new List();
}
public double score { get; set; }
public List item { get; set; }
}
public class ScoreCount{
public double score { get; set; }
public int count { get; set; }
}
}