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

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