Knowledge.cs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Text;
  5. namespace TEAMModelOS.SDK.Models
  6. {
  7. /// <summary>
  8. ///Teaching materials 教学材料 --- 知识点,知识块
  9. /// </summary>
  10. public class Knowledge : CosmosEntity
  11. {
  12. public Knowledge() {
  13. points = new List<string>();
  14. blocks = new List<Block>();
  15. pk = "Knowledge";
  16. }
  17. [Required(ErrorMessage = "owner 必须设置")]
  18. public string owner { get; set; }
  19. public string scope { get; set; }
  20. /// <summary>
  21. /// 学段id
  22. /// </summary>
  23. public string periodId { get; set; }
  24. /// <summary>
  25. /// 学科id
  26. /// </summary>
  27. public string subjectId { get; set; }
  28. /// <summary>
  29. /// 知识点
  30. /// </summary>
  31. public List<string> points { get; set; } = new List<string>();
  32. /// <summary>
  33. /// 知识块
  34. /// </summary>
  35. public List<Block> blocks { get; set; } = new List<Block>();
  36. public List<PointNode> nodes { get; set; } = new List<PointNode>();
  37. }
  38. public class PointNode
  39. {
  40. public string id { get; set; }
  41. public string name { get; set; }
  42. public string pid { get; set; }
  43. /// <summary>
  44. /// 使用次数
  45. /// </summary>
  46. public long used { get; set; }
  47. /// <summary>
  48. /// 关联的资源数量
  49. /// </summary>
  50. public long link { get; set; }
  51. }
  52. public class KnowledgeTreeDto
  53. {
  54. }
  55. public class PointTree
  56. {
  57. public string id { get; set; }
  58. public string name { get; set; }
  59. public string pid { get; set; }
  60. /// <summary>
  61. /// 知识点属性结构的子节点
  62. /// </summary>
  63. public List<PointTree> nodes { get; set; }= new List<PointTree>();
  64. }
  65. public class TagOldNew
  66. {
  67. [Required(ErrorMessage = "_old 必须设置")]
  68. public string _old { get; set; }
  69. [Required(ErrorMessage = "_new 必须设置")]
  70. public string _new { get; set; }
  71. }
  72. public class Block {
  73. public string name { get; set; }
  74. /// <summary>
  75. /// 默认学校添加的 0, 1,区级统一设置的(学校不能删除,不能编辑)。
  76. /// </summary>
  77. public int source { get; set; } = 0;
  78. public List<string> points { get; set; } = new List<string>();
  79. }
  80. /*
  81. {
  82. "id": "123",
  83. "code": "Knowledge-hbcn-subjectId",
  84. "periodId": "uuid",
  85. "points": [
  86. "一元一次方程","二元一次方程","一元二次方程","直线方程","三元一次方程","鸡兔同笼问题","微积分方程","函数有界性","函数单调性","函数奇偶性","函数周期性","函数连续性","函数凹凸性",
  87. "常函数","一次函数","二次函数","三次函数","四次函数","五次函数","幂函数","指数函数","对数函数","三角函数","反三角函数","常数函数",
  88. "正弦函数","余弦函数","正切函数","余切函数","正割函数","余割函数","正矢函数","余矢函数","半正矢函数","半余矢函数","外正割函数","外余割函数"
  89. ],
  90. "block":[
  91. {
  92. "name": "方程式" ,
  93. "points":["一元一次方程","二元一次方程","一元二次方程","直线方程","三元一次方程","鸡兔同笼问题","微积分方程"]
  94. },
  95. {
  96. "name": "函数的特性" ,
  97. "points": ["函数有界性","函数单调性","函数奇偶性","函数周期性","函数连续性","函数凹凸性"]
  98. },
  99. {
  100. "name": "多项式函数" ,
  101. "points": ["常函数","一次函数","二次函数","三次函数","四次函数","五次函数"]
  102. },
  103. {
  104. "name": "基本初等函数" ,
  105. "points": ["幂函数","指数函数","对数函数","三角函数","反三角函数","常数函数"]
  106. },
  107. {
  108. "name": "三角函数" ,
  109. "points":["正弦函数","余弦函数","正切函数","余切函数","正割函数","余割函数","正矢函数","余矢函数","半正矢函数","半余矢函数","外正割函数","外余割函数"]
  110. }
  111. ]
  112. }
  113. */
  114. }