You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

user_business_struct.go 18 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  1. package models
  2. import "code.gitea.io/gitea/modules/timeutil"
  3. type UserBusinessAnalysisCurrentYear struct {
  4. ID int64 `xorm:"pk"`
  5. CountDate int64 `xorm:"pk"`
  6. //action :ActionMergePullRequest // 11
  7. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  8. //action :ActionCommitRepo
  9. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  10. //issue // 10
  11. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  12. //comment table current date
  13. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  14. //watch table current date
  15. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  16. //star table current date
  17. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  18. //follow table
  19. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  20. // user table
  21. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  22. //
  23. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  24. //attachement table
  25. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  26. //0
  27. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  28. //issue, issueassignees
  29. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  30. //baike
  31. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  32. //user
  33. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  34. //repo
  35. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  36. //login count, from elk
  37. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  38. //openi index
  39. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  40. //user
  41. Email string `xorm:"NOT NULL"`
  42. //user
  43. Name string `xorm:"NOT NULL"`
  44. DataDate string `xorm:"NULL"`
  45. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  46. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  47. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  48. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  49. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  50. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  51. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  52. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  53. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  54. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  55. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  56. UserLocation string `xorm:"NULL"`
  57. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  58. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  59. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  60. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  61. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  62. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  63. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  64. }
  65. type UserBusinessAnalysisLast30Day struct {
  66. ID int64 `xorm:"pk"`
  67. CountDate int64 `xorm:"pk"`
  68. //action :ActionMergePullRequest // 11
  69. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  70. //action :ActionCommitRepo
  71. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  72. //issue // 10
  73. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  74. //comment table current date
  75. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  76. //watch table current date
  77. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  78. //star table current date
  79. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  80. //follow table
  81. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  82. // user table
  83. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  84. //
  85. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  86. //attachement table
  87. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  88. //0
  89. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  90. //issue, issueassignees
  91. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  92. //baike
  93. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  94. //user
  95. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  96. //repo
  97. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  98. //login count, from elk
  99. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  100. //openi index
  101. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  102. //user
  103. Email string `xorm:"NOT NULL"`
  104. //user
  105. Name string `xorm:"NOT NULL"`
  106. DataDate string `xorm:"NULL"`
  107. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  108. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  109. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  110. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  111. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  112. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  113. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  114. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  115. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  116. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  117. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  118. UserLocation string `xorm:"NULL"`
  119. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  120. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  121. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  122. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  123. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  124. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  125. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  126. }
  127. type UserBusinessAnalysisLastMonth struct {
  128. ID int64 `xorm:"pk"`
  129. CountDate int64 `xorm:"pk"`
  130. //action :ActionMergePullRequest // 11
  131. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  132. //action :ActionCommitRepo
  133. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  134. //issue // 10
  135. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  136. //comment table current date
  137. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  138. //watch table current date
  139. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  140. //star table current date
  141. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  142. //follow table
  143. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  144. // user table
  145. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  146. //
  147. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  148. //attachement table
  149. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  150. //0
  151. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  152. //issue, issueassignees
  153. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  154. //baike
  155. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  156. //user
  157. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  158. //repo
  159. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  160. //login count, from elk
  161. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  162. //openi index
  163. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  164. //user
  165. Email string `xorm:"NOT NULL"`
  166. //user
  167. Name string `xorm:"NOT NULL"`
  168. DataDate string `xorm:"NULL"`
  169. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  170. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  171. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  172. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  173. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  174. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  175. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  176. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  177. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  178. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  179. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  180. UserLocation string `xorm:"NULL"`
  181. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  182. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  183. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  184. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  185. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  186. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  187. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  188. }
  189. type UserBusinessAnalysisCurrentMonth struct {
  190. ID int64 `xorm:"pk"`
  191. CountDate int64 `xorm:"pk"`
  192. //action :ActionMergePullRequest // 11
  193. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  194. //action :ActionCommitRepo
  195. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  196. //issue // 10
  197. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  198. //comment table current date
  199. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  200. //watch table current date
  201. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  202. //star table current date
  203. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  204. //follow table
  205. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  206. // user table
  207. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  208. //
  209. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  210. //attachement table
  211. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  212. //0
  213. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  214. //issue, issueassignees
  215. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  216. //baike
  217. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  218. //user
  219. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  220. //repo
  221. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  222. //login count, from elk
  223. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  224. //openi index
  225. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  226. //user
  227. Email string `xorm:"NOT NULL"`
  228. //user
  229. Name string `xorm:"NOT NULL"`
  230. DataDate string `xorm:"NULL"`
  231. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  232. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  233. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  234. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  235. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  236. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  237. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  238. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  239. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  240. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  241. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  242. UserLocation string `xorm:"NULL"`
  243. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  244. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  245. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  246. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  247. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  248. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  249. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  250. }
  251. type UserBusinessAnalysisCurrentWeek struct {
  252. ID int64 `xorm:"pk"`
  253. CountDate int64 `xorm:"pk"`
  254. //action :ActionMergePullRequest // 11
  255. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  256. //action :ActionCommitRepo
  257. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  258. //issue // 10
  259. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  260. //comment table current date
  261. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  262. //watch table current date
  263. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  264. //star table current date
  265. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  266. //follow table
  267. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  268. // user table
  269. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  270. //
  271. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  272. //attachement table
  273. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  274. //0
  275. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  276. //issue, issueassignees
  277. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  278. //baike
  279. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  280. //user
  281. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  282. //repo
  283. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  284. //login count, from elk
  285. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  286. //openi index
  287. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  288. //user
  289. Email string `xorm:"NOT NULL"`
  290. //user
  291. Name string `xorm:"NOT NULL"`
  292. DataDate string `xorm:"NULL"`
  293. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  294. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  295. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  296. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  297. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  298. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  299. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  300. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  301. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  302. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  303. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  304. UserLocation string `xorm:"NULL"`
  305. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  306. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  307. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  308. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  309. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  310. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  311. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  312. }
  313. type UserBusinessAnalysisYesterday struct {
  314. ID int64 `xorm:"pk"`
  315. CountDate int64 `xorm:"pk"`
  316. //action :ActionMergePullRequest // 11
  317. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  318. //action :ActionCommitRepo
  319. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  320. //issue // 10
  321. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  322. //comment table current date
  323. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  324. //watch table current date
  325. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  326. //star table current date
  327. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  328. //follow table
  329. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  330. // user table
  331. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  332. //
  333. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  334. //attachement table
  335. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  336. //0
  337. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  338. //issue, issueassignees
  339. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  340. //baike
  341. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  342. //user
  343. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  344. //repo
  345. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  346. //login count, from elk
  347. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  348. //openi index
  349. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  350. //user
  351. Email string `xorm:"NOT NULL"`
  352. //user
  353. Name string `xorm:"NOT NULL"`
  354. DataDate string `xorm:"NULL"`
  355. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  356. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  357. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  358. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  359. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  360. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  361. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  362. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  363. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  364. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  365. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  366. UserLocation string `xorm:"NULL"`
  367. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  368. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  369. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  370. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  371. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  372. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  373. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  374. }
  375. type UserBusinessAnalysisLastWeek struct {
  376. ID int64 `xorm:"pk"`
  377. CountDate int64 `xorm:"pk"`
  378. //action :ActionMergePullRequest // 11
  379. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  380. //action :ActionCommitRepo
  381. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  382. //issue // 10
  383. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  384. //comment table current date
  385. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  386. //watch table current date
  387. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  388. //star table current date
  389. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  390. //follow table
  391. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  392. // user table
  393. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  394. //
  395. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  396. //attachement table
  397. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  398. //0
  399. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  400. //issue, issueassignees
  401. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  402. //baike
  403. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  404. //user
  405. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  406. //repo
  407. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  408. //login count, from elk
  409. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  410. //openi index
  411. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  412. //user
  413. Email string `xorm:"NOT NULL"`
  414. //user
  415. Name string `xorm:"NOT NULL"`
  416. DataDate string `xorm:"NULL"`
  417. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  418. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  419. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  420. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  421. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  422. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  423. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  424. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  425. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  426. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  427. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  428. UserLocation string `xorm:"NULL"`
  429. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  430. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  431. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  432. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  433. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  434. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  435. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  436. }
  437. type UserAnalysisPara struct {
  438. Key string `xorm:"NOT NULL"`
  439. Value float64 `xorm:"NOT NULL DEFAULT 0"`
  440. }
  441. type UserMetrics struct {
  442. CountDate int64 `xorm:"pk"`
  443. ActivateRegistUser int `xorm:"NOT NULL DEFAULT 0"` //当天激活用户
  444. NotActivateRegistUser int `xorm:"NOT NULL DEFAULT 0"` //当天未激活用户
  445. ActivateIndex float64 `xorm:"NOT NULL DEFAULT 0"` //激活比率
  446. RegistActivityUser int `xorm:"NOT NULL DEFAULT 0"` //当天注册激活的人中,有贡献活动的人
  447. HasActivityUser int `xorm:"NOT NULL DEFAULT 0"` //当天有贡献活动的人
  448. TotalUser int `xorm:"NOT NULL DEFAULT 0"`
  449. TotalRegistUser int `xorm:"-"`
  450. TotalActivateRegistUser int `xorm:"NOT NULL DEFAULT 0"`
  451. TotalNotActivateRegistUser int `xorm:"-"`
  452. TotalHasActivityUser int `xorm:"NOT NULL DEFAULT 0"`
  453. DisplayDate string `xorm:"-"`
  454. DataDate string `xorm:"NULL"`
  455. DaysForMonth int `xorm:"NOT NULL DEFAULT 0"`
  456. HasActivityUserJson string `xorm:"text NULL"` //贡献活动用户列表
  457. ActivityUserJson string `xorm:"text NULL"` //激活用户列表
  458. CurrentDayRegistUser int `xorm:"NOT NULL DEFAULT 0"` //当天注册用户
  459. }