| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- using Newtonsoft.Json;
- using Newtonsoft.Json.Converters;
- using System.Collections.Generic;
- namespace DaJiaoYan.Models
- {
- public class PartitionConfig
- {
- /// <summary>
- /// 选项相关
- /// {"height":38,"optionCount":"4","options":"A,B,C,D","width":282,"x":149,"y":458}
- /// </summary>
- public class TopicRect
- {
- public int X { get; set; }
- public int Y { get; set; }
- public int Width { get; set; }
- public int Height { get; set; }
- public int OptionCount { get; set; }
- /// <summary>
- /// 选项
- /// </summary>
- public string Options { get; set; }
- /// <summary>
- /// 选项列表,将Options 切分
- /// </summary>
- public List<string> OptionList { get; set; }
- }
- public class OptionRect
- {
- public int X { get; set; }
- public int Y { get; set; }
- public int Width { get; set; }
- public int Height { get; set; }
- public string OptionValue { get; set; }
- /// <summary>
- /// 该选项的点数量(需要预先载入模版统计点的数量)
- /// </summary>
- public int Points { get; set; }
- /// <summary>
- /// 题号?
- /// </summary>
- public string Key { get; set; }
- /// <summary>
- /// 选项的顺序
- /// </summary>
- public int Index { get; set; }
- /// <summary>
- /// 选项的内容
- /// </summary>
- public string Option { get; set; }
- /// <summary>
- /// 填涂的百分比
- /// </summary>
- public double PaintThreshold
- {
- get; set;
- }
- }
- public class PartitionAuthority
- {
- public bool Divide { get; set; }
- [JsonProperty(PropertyName = "upload_student")]
- public bool UploadStudent { get; set; }
- }
- public class DivideConfig
- {
- /// <summary>
- /// 小空划分信息
- /// </summary>
- [JsonProperty(PropertyName = "choose_rects")]
- public List<TestOptionConfig> EmptyRects { get; set; }
- [JsonProperty(PropertyName = "correct_type"), JsonConverter(typeof(StringEnumConverter))]
- public Enumerates.QuestionType? CorrectType { get; set; }
- [JsonProperty(PropertyName = "end_index")]
- public int EndIndex { get; set; }
- [JsonProperty(PropertyName = "start_index")]
- public int StartIndex { get; set; }
- [JsonProperty(PropertyName = "pager_type")]
- public string PaperType { get; set; }
- [JsonProperty(PropertyName = "option_type")]
- public string OptionType { get; set; }
- /// <summary>
- /// 选项划分信息
- /// </summary>
- [JsonProperty(PropertyName = "option_rects")]
- public List<OptionRect> OptionRects { get; set; }
- [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
- public Rect Rect { get; set; }
- [JsonProperty(PropertyName = "score_rects")]
- public List<Models.ScoreRect> ScoreRects { get; set; }
- [JsonProperty(PropertyName = "topic_rects")]
- public Dictionary<string, TopicRect> TopicRects { get; set; }
- [JsonProperty(PropertyName = "rect_divide", NullValueHandling = NullValueHandling.Ignore)]
- public Dictionary<string, RectDivide> RectDivides { get; set; }
- }
- public class RectDivide
- {
- [JsonProperty(PropertyName = "rect")]
- public List<Rect> Rect { get; set; }
- [JsonProperty(PropertyName = "type")]
- public int Type { get; set; }
- [JsonProperty(PropertyName = "type_tips")]
- public string TypeTips { get; set; }
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
- [JsonProperty(PropertyName = "order")]
- public int Order { get; set; }
- [JsonProperty(PropertyName = "option_rect")]
- public Dictionary<string, RectDivide> OptionRect { get; set; }
- [JsonProperty(PropertyName = "index")]
- public int Index { get; set; }
- [JsonProperty(PropertyName = "children")]
- public Dictionary<string, RectDivide> Children { get; set; }
- }
- public string Id { get; set; }
- public string Name { get; set; }
- [JsonProperty(PropertyName = "correct_type")]
- public Enumerates.QuestionType CorrectType { get; set; }
- [JsonProperty(PropertyName = "show_order")]
- public int ShowOrder { get; set; }
- [JsonProperty(PropertyName = "partition_score")]
- public float PartitionScore { get; set; }
- public DivideConfig Config { get; set; }
- [JsonProperty(PropertyName = "empty_count")]
- public int EmptyCount { get; set; }
- [JsonProperty(PropertyName = "option_count")]
- public int OptionCount { get; set; }
- [JsonProperty(PropertyName = "question_config")]
- public List<QuestionConfig> QuestionConfigs { get; set; }
- public PartitionAuthority Authority { get; set; }
- }
- }
|