Paper.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Text;
  6. using TEAMModelOS.SDK.Context.Attributes.Azure;
  7. using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
  8. namespace TEAMModelOS.Service.Models
  9. {
  10. /// <summary>
  11. /// 试卷信息
  12. /// </summary>
  13. [CosmosDB(RU = 400, Name = "School")]
  14. public class Paper : ID
  15. {
  16. /// <summary>
  17. /// 学校编码,个人编码,考试编码
  18. /// </summary>
  19. [PartitionKey]
  20. [Required(ErrorMessage = "{0} 必须填写")]
  21. public string code { get; set; }
  22. public string pk { get; set; }
  23. public int? ttl { get; set; }
  24. public Paper() {
  25. item = new List<ItemInfo>();
  26. }
  27. [JsonProperty(PropertyName = "id")]
  28. public string id { get; set; }
  29. public List<ItemInfo> item { get; set; }
  30. public string subjectCode { get; set; }
  31. public string periodCode { get; set; }
  32. public List<string> gradeCode { get; set; }
  33. public string name { get; set; }
  34. public int itemCount { get; set; }
  35. public double level { get; set; }
  36. public double score { get; set; }
  37. /// <summary>
  38. /// type:{
  39. /// pointkey:[num1,num2....]
  40. /// }
  41. /// </summary>
  42. public Dictionary<string, ScoreCount> typeScore { get; set; }
  43. public Dictionary<string, ScoreCount> levelScore { get; set; }
  44. public Dictionary<string, ScoreItem> pointScore { get; set; }
  45. public long createTime { get; set; }
  46. /// <summary>
  47. /// 正确答案
  48. /// </summary>
  49. public List<Answer> answers { get; set; }
  50. }
  51. public class ScoreItem
  52. {
  53. public ScoreItem()
  54. {
  55. item = new List<int>();
  56. }
  57. public double score { get; set; }
  58. public List<int> item { get; set; }
  59. }
  60. public class ScoreCount{
  61. public double score { get; set; }
  62. public int count { get; set; }
  63. }
  64. }