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 19 kB

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