using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Collections.Generic;
namespace DaJiaoYan.Models
{
public class PartitionConfig
{
///
/// 选项相关
/// {"height":38,"optionCount":"4","options":"A,B,C,D","width":282,"x":149,"y":458}
///
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; }
///
/// 选项
///
public string Options { get; set; }
///
/// 选项列表,将Options 切分
///
public List 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; }
///
/// 该选项的点数量(需要预先载入模版统计点的数量)
///
public int Points { get; set; }
///
/// 题号?
///
public string Key { get; set; }
///
/// 选项的顺序
///
public int Index { get; set; }
///
/// 选项的内容
///
public string Option { get; set; }
///
/// 填涂的百分比
///
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
{
///
/// 小空划分信息
///
[JsonProperty(PropertyName = "choose_rects")]
public List 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; }
///
/// 选项划分信息
///
[JsonProperty(PropertyName = "option_rects")]
public List OptionRects { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public Rect Rect { get; set; }
[JsonProperty(PropertyName = "score_rects")]
public List ScoreRects { get; set; }
[JsonProperty(PropertyName = "topic_rects")]
public Dictionary TopicRects { get; set; }
[JsonProperty(PropertyName = "rect_divide", NullValueHandling = NullValueHandling.Ignore)]
public Dictionary RectDivides { get; set; }
}
public class RectDivide
{
[JsonProperty(PropertyName = "rect")]
public List 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 OptionRect { get; set; }
[JsonProperty(PropertyName = "index")]
public int Index { get; set; }
[JsonProperty(PropertyName = "children")]
public Dictionary 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 QuestionConfigs { get; set; }
public PartitionAuthority Authority { get; set; }
}
}