ProductAnalysis.cs 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using TEAMModelOS.SDK.Models.Dtos;
  5. namespace TEAMModelOS.SDK.Models
  6. {
  7. /// <summary>
  8. /// CS IOT TeachingData (Redis)
  9. /// </summary>
  10. public class IotTeachingData
  11. {
  12. public long timestamp { get; set; }
  13. public string deviceId { get; set; }
  14. public string channel { get; set; }
  15. public string tmid { get; set; }
  16. public string schoolId { get; set; }
  17. /// <summary>
  18. /// 開課使用IES課程 0:false 1:true
  19. /// </summary>
  20. public string useIES { get; set; }
  21. /// <summary>
  22. /// 課堂中取用IES5資源數
  23. /// </summary>
  24. public int useIES5Resource { get; set; }
  25. /// <summary>
  26. /// 課堂中有使用webirs 0:false 1:true
  27. /// </summary>
  28. public string useWebIrs { get; set; }
  29. /// <summary>
  30. /// 課堂中有使用硬體IRS 0:false 1:true
  31. /// </summary>
  32. public string useDeviceIrs { get; set; }
  33. /// <summary>
  34. /// 課堂中有使用Haboard 0:false 1:true
  35. /// </summary>
  36. public string useHaboard { get; set; }
  37. /// <summary>
  38. /// 課堂中有使用HiTA 0:false 1:true
  39. /// </summary>
  40. public string useHita { get; set; }
  41. /// <summary>
  42. /// 課堂時間(分鐘整數)
  43. /// </summary>
  44. public int lessonLengMin { get; set; }
  45. /// <summary>
  46. /// 學生出席數(整數)
  47. /// </summary>
  48. public int stuShow { get; set; }
  49. /// <summary>
  50. /// T指數(整數)
  51. /// </summary>
  52. public int tPoint { get; set; }
  53. /// <summary>
  54. /// 學習型態: 合作 0:false 1:true
  55. /// </summary>
  56. public string lTypeCoop { get; set; }
  57. /// <summary>
  58. /// 學習型態: 互動 0:false 1:true
  59. /// </summary>
  60. public string lTypeIact { get; set; }
  61. /// <summary>
  62. /// 學習型態: 任務 0:false 1:true
  63. /// </summary>
  64. public string lTypeMis { get; set; }
  65. /// <summary>
  66. /// 學習型態: 測驗 0:false 1:true
  67. /// </summary>
  68. public string lTypeTst { get; set; }
  69. /// <summary>
  70. /// 學習型態: 差異化 0:false 1:true
  71. /// </summary>
  72. public string lTypeDif { get; set; }
  73. /// <summary>
  74. /// 授權方式 0:無授權 1:id授權 2:機器授權 3:ID和機器授權
  75. /// </summary>
  76. public string authType { get; set; }
  77. /// <summary>
  78. /// 任務數
  79. /// </summary>
  80. public int mission { get; set; }
  81. /// <summary>
  82. /// 作品任務完成總數
  83. /// </summary>
  84. public int missionFin { get; set; }
  85. /// <summary>
  86. /// 題數
  87. /// </summary>
  88. public int item { get; set; }
  89. /// <summary>
  90. /// 互動總次數
  91. /// </summary>
  92. public int interact { get; set; }
  93. /// <summary>
  94. /// IP
  95. /// </summary>
  96. public string ip { get; set; }
  97. /// <summary>
  98. /// 版本
  99. /// </summary>
  100. /// [例]ex. 5.0.21.0000 -> 500210000
  101. public string version { get; set; }
  102. }
  103. public class ProdAnalysisBase
  104. {
  105. public string schoolId { get; set; } //學校ID
  106. public string toolType { get; set; } //HiTeach、HiTeachCC、HiTA
  107. public int deviceCnt { get; set; } //機器數(不重複)
  108. public int deviceNoAuth { get; set; } //無機器授權數
  109. public int deviceAuth { get; set; } //有安裝機器授權數
  110. public int tmidCnt { get; set; } //TMID數(不重複)
  111. public int lessonRecord { get; set; } //課堂記錄數
  112. public int useIES { get; set; } //使用IES課程
  113. public int useIES5Resource { get; set; } //課堂中取用IES5資源數
  114. public int useWebIrs { get; set; } //課堂中有使用webirs
  115. public int useDeviceIrs { get; set; } //課堂中有使用硬體IRS
  116. public int useHaboard { get; set; } //課堂中有使用Haboard
  117. public int useHita { get; set; } //課堂中有使用HiTA
  118. public int lessonLengMin { get; set; } //課堂時間(分鐘整數)
  119. public int stuShow { get; set; } //學生出席人次
  120. public long stuLessonLengMin { get; set; } //學生參與總時數 ※課堂時間x學生出席人次
  121. public int tGreen { get; set; } //T綠燈數(T>=70)
  122. public int lTypeCoop { get; set; } //學習型態: 合作
  123. public int lTypeIact { get; set; } //學習型態: 互動
  124. public int lTypeMis { get; set; } //學習型態: 任務
  125. public int lTypeTst { get; set; } //學習型態: 測驗
  126. public int lTypeDif { get; set; } //學習型態: 差異化
  127. public int lTypeNone { get; set; } //學習型態: 無
  128. public int lessonCnt928 { get; set; } //使用928授權課堂數
  129. public int lessonCntId { get; set; } //僅使用ID授權課堂數
  130. public int lessonCntDevice { get; set; } //僅使用機器授權課堂數
  131. public int lessonCntIdDevice { get; set; } //使用ID+機器授權課堂數
  132. public int mission { get; set; } //任務數
  133. public int missionFin { get; set; } //作品任務完成總數
  134. public int item { get; set; } //題數
  135. public int interact { get; set; } //互動總次數
  136. }
  137. /// <summary>
  138. /// IES5 ProdAnalysis (Redis)
  139. /// </summary>
  140. public class ProdAnalysis : ProdAnalysisBase
  141. {
  142. public ProdAnalysis()
  143. {
  144. deviceList = new List<string>();
  145. deviceNoAuthList = new List<string>();
  146. deviceAuthList = new List<string>();
  147. tmidList = new List<string>();
  148. }
  149. public List<string> deviceList { get; set; } //機器ID列表
  150. public List<string> deviceNoAuthList { get; set; } //無機器授權ID列表
  151. public List<string> deviceAuthList { get; set; } //有安裝機器授權ID列表
  152. public List<string> tmidList { get; set; } //TMID列表
  153. }
  154. public class ProdAnalysisApiResult : ProdAnalysis
  155. {
  156. public ProdAnalysisApiResult()
  157. {
  158. school = new SchoolSimple();
  159. }
  160. public SchoolSimple school { get; set; }
  161. public string dateUnit { get; set; }
  162. public string date { get; set; } //日期 [例] 2022、202203、20220314
  163. public int year { get; set; } //统计日期:年
  164. public int month { get; set; } //统计日期:月
  165. public int day { get; set; } //统计日期:日
  166. }
  167. public class ProdAnalysisCosmos : ProdAnalysis
  168. {
  169. public ProdAnalysisCosmos()
  170. {
  171. pk = "ProdAnalysis";
  172. code = "ProdAnalysis";
  173. deviceList = new List<string>();
  174. }
  175. public string pk { get; set; }
  176. public string code { get; set; }
  177. public string id { get; set; }
  178. public string dateUnit { get; set; } //統計日期單位 "year":年統計 "month":月統計 "day":日統計
  179. public string date { get; set; } //统计日期 ※依据dateUnit变化 [例]"year":2023 "month":202302 "day":20230210
  180. public long dateTime { get; set; } //timestamp UTC milisecond 比較時間用
  181. public int year { get; set; } //统计日期:年
  182. public int month { get; set; } //统计日期:月
  183. public int day { get; set; } //统计日期:日
  184. public long createDate { get; set; } //統計時間
  185. public int? ttl { get; set; } = -1;
  186. }
  187. public class SchoolSimple
  188. {
  189. public string name { get; set; }
  190. public string region { get; set; }
  191. public string province { get; set; }
  192. public string city { get; set; }
  193. public string dist { get; set; }
  194. public string type { get; set; }
  195. }
  196. }