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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. package models
  2. import "code.gitea.io/gitea/modules/timeutil"
  3. type UserSummaryCurrentYear struct {
  4. ID int64 `xorm:"pk"`
  5. Email string `xorm:"NOT NULL"`
  6. //user
  7. Name string `xorm:"NOT NULL"`
  8. Phone string `xorm:"NULL"`
  9. //user
  10. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  11. DateCount int `xorm:"NOT NULL DEFAULT 0"`
  12. MostActiveDay string `xorm:" NULL "` //08.05
  13. RepoInfo string `xorm:"varchar(1000)"` //创建了XX 个项目,公开项目XX 个,私有项目XX 个累计被下载XXX 次,其中《XXXXXXX 》项目,获得了最高XXX 次下载
  14. DataSetInfo string `xorm:"varchar(500)"` //创建了XX 个数据集,上传了XX 个数据集文件,累计被下载XX 次,被收藏XX 次
  15. CodeInfo string `xorm:"varchar(500)"` //代码提交次数,提交总代码行数,最晚的提交时间
  16. CloudBrainInfo string `xorm:"varchar(1000)"` //,创建了XX 个云脑任务,调试任务XX 个,训练任务XX 个,推理任务XX 个,累计运行了XXXX 卡时,累计节省xxxxx 元
  17. //这些免费的算力资源分别有,XX% 来自鹏城云脑1,XX% 来自鹏城云脑2,XX% 来自智算网络
  18. PlayARoll string `xorm:"varchar(500)"` //你参加了XX 次“我为开源打榜狂”活动,累计上榜XX 次,总共获得了社区XXX 元的激励
  19. Label string `xorm:"varchar(500)"`
  20. }
  21. type UserBusinessAnalysisCurrentYear struct {
  22. ID int64 `xorm:"pk"`
  23. CountDate int64 `xorm:"pk"`
  24. //action :ActionMergePullRequest // 11
  25. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  26. //action :ActionCommitRepo
  27. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  28. //issue // 10
  29. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  30. //comment table current date
  31. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  32. //watch table current date
  33. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  34. //star table current date
  35. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  36. //follow table
  37. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  38. // user table
  39. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  40. //
  41. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  42. //attachement table
  43. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  44. //0
  45. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  46. //issue, issueassignees
  47. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  48. //baike
  49. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  50. //user
  51. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  52. //repo
  53. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  54. //login count, from elk
  55. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  56. //openi index
  57. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  58. //user
  59. Email string `xorm:"NOT NULL"`
  60. //user
  61. Name string `xorm:"NOT NULL"`
  62. DataDate string `xorm:"NULL"`
  63. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  64. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  65. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  66. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  67. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  68. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  69. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  70. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  71. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  72. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  73. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  74. UserLocation string `xorm:"NULL"`
  75. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  76. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  77. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  78. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  79. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  80. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  81. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  82. Phone string `xorm:"NULL"`
  83. InvitationUserNum int `xorm:"NOT NULL DEFAULT 0"`
  84. ModelConvertCount int `xorm:"NOT NULL DEFAULT 0"`
  85. }
  86. type UserBusinessAnalysisLast30Day struct {
  87. ID int64 `xorm:"pk"`
  88. CountDate int64 `xorm:"pk"`
  89. //action :ActionMergePullRequest // 11
  90. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  91. //action :ActionCommitRepo
  92. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  93. //issue // 10
  94. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  95. //comment table current date
  96. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  97. //watch table current date
  98. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  99. //star table current date
  100. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  101. //follow table
  102. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  103. // user table
  104. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  105. //
  106. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  107. //attachement table
  108. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  109. //0
  110. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  111. //issue, issueassignees
  112. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  113. //baike
  114. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  115. //user
  116. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  117. //repo
  118. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  119. //login count, from elk
  120. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  121. //openi index
  122. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  123. //user
  124. Email string `xorm:"NOT NULL"`
  125. //user
  126. Name string `xorm:"NOT NULL"`
  127. DataDate string `xorm:"NULL"`
  128. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  129. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  130. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  131. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  132. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  133. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  134. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  135. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  136. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  137. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  138. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  139. UserLocation string `xorm:"NULL"`
  140. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  141. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  142. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  143. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  144. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  145. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  146. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  147. Phone string `xorm:"NULL"`
  148. InvitationUserNum int `xorm:"NOT NULL DEFAULT 0"`
  149. ModelConvertCount int `xorm:"NOT NULL DEFAULT 0"`
  150. }
  151. type UserBusinessAnalysisLastMonth struct {
  152. ID int64 `xorm:"pk"`
  153. CountDate int64 `xorm:"pk"`
  154. //action :ActionMergePullRequest // 11
  155. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  156. //action :ActionCommitRepo
  157. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  158. //issue // 10
  159. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  160. //comment table current date
  161. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  162. //watch table current date
  163. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  164. //star table current date
  165. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  166. //follow table
  167. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  168. // user table
  169. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  170. //
  171. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  172. //attachement table
  173. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  174. //0
  175. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  176. //issue, issueassignees
  177. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  178. //baike
  179. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  180. //user
  181. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  182. //repo
  183. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  184. //login count, from elk
  185. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  186. //openi index
  187. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  188. //user
  189. Email string `xorm:"NOT NULL"`
  190. //user
  191. Name string `xorm:"NOT NULL"`
  192. DataDate string `xorm:"NULL"`
  193. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  194. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  195. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  196. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  197. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  198. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  199. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  200. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  201. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  202. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  203. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  204. UserLocation string `xorm:"NULL"`
  205. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  206. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  207. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  208. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  209. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  210. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  211. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  212. Phone string `xorm:"NULL"`
  213. InvitationUserNum int `xorm:"NOT NULL DEFAULT 0"`
  214. ModelConvertCount int `xorm:"NOT NULL DEFAULT 0"`
  215. }
  216. type UserBusinessAnalysisCurrentMonth struct {
  217. ID int64 `xorm:"pk"`
  218. CountDate int64 `xorm:"pk"`
  219. //action :ActionMergePullRequest // 11
  220. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  221. //action :ActionCommitRepo
  222. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  223. //issue // 10
  224. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  225. //comment table current date
  226. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  227. //watch table current date
  228. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  229. //star table current date
  230. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  231. //follow table
  232. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  233. // user table
  234. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  235. //
  236. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  237. //attachement table
  238. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  239. //0
  240. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  241. //issue, issueassignees
  242. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  243. //baike
  244. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  245. //user
  246. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  247. //repo
  248. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  249. //login count, from elk
  250. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  251. //openi index
  252. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  253. //user
  254. Email string `xorm:"NOT NULL"`
  255. //user
  256. Name string `xorm:"NOT NULL"`
  257. DataDate string `xorm:"NULL"`
  258. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  259. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  260. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  261. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  262. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  263. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  264. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  265. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  266. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  267. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  268. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  269. UserLocation string `xorm:"NULL"`
  270. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  271. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  272. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  273. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  274. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  275. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  276. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  277. Phone string `xorm:"NULL"`
  278. InvitationUserNum int `xorm:"NOT NULL DEFAULT 0"`
  279. ModelConvertCount int `xorm:"NOT NULL DEFAULT 0"`
  280. }
  281. type UserBusinessAnalysisCurrentWeek struct {
  282. ID int64 `xorm:"pk"`
  283. CountDate int64 `xorm:"pk"`
  284. //action :ActionMergePullRequest // 11
  285. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  286. //action :ActionCommitRepo
  287. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  288. //issue // 10
  289. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  290. //comment table current date
  291. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  292. //watch table current date
  293. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  294. //star table current date
  295. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  296. //follow table
  297. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  298. // user table
  299. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  300. //
  301. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  302. //attachement table
  303. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  304. //0
  305. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  306. //issue, issueassignees
  307. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  308. //baike
  309. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  310. //user
  311. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  312. //repo
  313. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  314. //login count, from elk
  315. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  316. //openi index
  317. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  318. //user
  319. Email string `xorm:"NOT NULL"`
  320. //user
  321. Name string `xorm:"NOT NULL"`
  322. DataDate string `xorm:"NULL"`
  323. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  324. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  325. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  326. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  327. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  328. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  329. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  330. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  331. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  332. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  333. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  334. UserLocation string `xorm:"NULL"`
  335. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  336. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  337. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  338. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  339. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  340. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  341. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  342. Phone string `xorm:"NULL"`
  343. InvitationUserNum int `xorm:"NOT NULL DEFAULT 0"`
  344. ModelConvertCount int `xorm:"NOT NULL DEFAULT 0"`
  345. }
  346. type UserBusinessAnalysisYesterday struct {
  347. ID int64 `xorm:"pk"`
  348. CountDate int64 `xorm:"pk"`
  349. //action :ActionMergePullRequest // 11
  350. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  351. //action :ActionCommitRepo
  352. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  353. //issue // 10
  354. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  355. //comment table current date
  356. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  357. //watch table current date
  358. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  359. //star table current date
  360. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  361. //follow table
  362. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  363. // user table
  364. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  365. //
  366. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  367. //attachement table
  368. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  369. //0
  370. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  371. //issue, issueassignees
  372. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  373. //baike
  374. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  375. //user
  376. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  377. //repo
  378. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  379. //login count, from elk
  380. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  381. //openi index
  382. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  383. //user
  384. Email string `xorm:"NOT NULL"`
  385. //user
  386. Name string `xorm:"NOT NULL"`
  387. DataDate string `xorm:"NULL"`
  388. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  389. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  390. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  391. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  392. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  393. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  394. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  395. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  396. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  397. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  398. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  399. UserLocation string `xorm:"NULL"`
  400. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  401. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  402. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  403. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  404. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  405. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  406. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  407. Phone string `xorm:"NULL"`
  408. InvitationUserNum int `xorm:"NOT NULL DEFAULT 0"`
  409. ModelConvertCount int `xorm:"NOT NULL DEFAULT 0"`
  410. }
  411. type UserBusinessAnalysisLastWeek struct {
  412. ID int64 `xorm:"pk"`
  413. CountDate int64 `xorm:"pk"`
  414. //action :ActionMergePullRequest // 11
  415. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  416. //action :ActionCommitRepo
  417. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  418. //issue // 10
  419. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  420. //comment table current date
  421. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  422. //watch table current date
  423. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  424. //star table current date
  425. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  426. //follow table
  427. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  428. // user table
  429. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  430. //
  431. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  432. //attachement table
  433. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  434. //0
  435. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  436. //issue, issueassignees
  437. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  438. //baike
  439. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  440. //user
  441. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  442. //repo
  443. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  444. //login count, from elk
  445. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  446. //openi index
  447. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  448. //user
  449. Email string `xorm:"NOT NULL"`
  450. //user
  451. Name string `xorm:"NOT NULL"`
  452. DataDate string `xorm:"NULL"`
  453. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  454. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  455. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  456. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  457. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  458. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  459. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  460. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  461. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  462. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  463. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  464. UserLocation string `xorm:"NULL"`
  465. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  466. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  467. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  468. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  469. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  470. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  471. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  472. Phone string `xorm:"NULL"`
  473. InvitationUserNum int `xorm:"NOT NULL DEFAULT 0"`
  474. ModelConvertCount int `xorm:"NOT NULL DEFAULT 0"`
  475. }
  476. type UserAnalysisPara struct {
  477. Key string `xorm:"NOT NULL"`
  478. Value float64 `xorm:"NOT NULL DEFAULT 0"`
  479. }
  480. type UserMetrics struct {
  481. CountDate int64 `xorm:"pk"`
  482. ActivateRegistUser int `xorm:"NOT NULL DEFAULT 0"` //当天激活用户
  483. NotActivateRegistUser int `xorm:"NOT NULL DEFAULT 0"` //当天未激活用户
  484. ActivateIndex float64 `xorm:"NOT NULL DEFAULT 0"` //激活比率
  485. RegistActivityUser int `xorm:"NOT NULL DEFAULT 0"` //当天注册激活的人中,有贡献活动的人
  486. HasActivityUser int `xorm:"NOT NULL DEFAULT 0"` //当天有贡献活动的人
  487. TotalUser int `xorm:"NOT NULL DEFAULT 0"`
  488. TotalRegistUser int `xorm:"-"`
  489. TotalActivateRegistUser int `xorm:"NOT NULL DEFAULT 0"`
  490. TotalNotActivateRegistUser int `xorm:"-"`
  491. TotalHasActivityUser int `xorm:"NOT NULL DEFAULT 0"`
  492. DisplayDate string `xorm:"-"`
  493. DataDate string `xorm:"NULL"`
  494. DaysForMonth int `xorm:"NOT NULL DEFAULT 0"`
  495. HasActivityUserJson string `xorm:"text NULL"` //贡献活动用户列表
  496. ActivityUserJson string `xorm:"text NULL"` //激活用户列表
  497. CurrentDayRegistUser int `xorm:"NOT NULL DEFAULT 0"` //当天注册用户
  498. }
  499. type UserBusinessAnalysisAll struct {
  500. ID int64 `xorm:"pk"`
  501. CountDate int64 `xorm:"pk"`
  502. //action :ActionMergePullRequest // 11
  503. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  504. //action :ActionCommitRepo // 5
  505. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  506. //action :ActionCreateIssue // 10
  507. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  508. //comment table current date
  509. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  510. //watch table current date
  511. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  512. //star table current date
  513. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  514. //follow table
  515. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  516. // user table
  517. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  518. //
  519. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  520. //attachement table
  521. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  522. //0
  523. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  524. //issue, issueassignees
  525. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  526. //baike
  527. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  528. //user
  529. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  530. //repo
  531. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  532. //login count, from elk
  533. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  534. //openi index
  535. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  536. //user
  537. Email string `xorm:"NOT NULL"`
  538. //user
  539. Name string `xorm:"NOT NULL"`
  540. DataDate string `xorm:"NULL"`
  541. //cloudbraintask
  542. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  543. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  544. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  545. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  546. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  547. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  548. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  549. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  550. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  551. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  552. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  553. UserLocation string `xorm:"NULL"`
  554. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  555. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  556. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  557. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  558. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  559. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  560. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  561. Phone string `xorm:"NULL"`
  562. InvitationUserNum int `xorm:"NOT NULL DEFAULT 0"`
  563. ModelConvertCount int `xorm:"NOT NULL DEFAULT 0"`
  564. }
  565. type UserBusinessAnalysis struct {
  566. ID int64 `xorm:"pk"`
  567. DataDate string `xorm:"pk"`
  568. CountDate int64 `xorm:"NULL"`
  569. //action :ActionMergePullRequest // 11
  570. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  571. //action :ActionCommitRepo // 5
  572. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  573. //action :ActionCreateIssue // 6
  574. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  575. //comment table current date
  576. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  577. //watch table current date
  578. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  579. //star table current date
  580. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  581. //follow table
  582. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  583. // user table
  584. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  585. //
  586. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  587. //attachement table
  588. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  589. //0
  590. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  591. //issue, issueassignees
  592. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  593. //baike
  594. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  595. //user
  596. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  597. //repo
  598. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  599. //login count, from elk
  600. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  601. //openi index
  602. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  603. //user
  604. Email string `xorm:"NOT NULL"`
  605. //user
  606. Name string `xorm:"NOT NULL"`
  607. CloudBrainTaskNum int `xorm:"NOT NULL DEFAULT 0"`
  608. GpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  609. NpuDebugJob int `xorm:"NOT NULL DEFAULT 0"`
  610. GpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  611. NpuTrainJob int `xorm:"NOT NULL DEFAULT 0"`
  612. NpuInferenceJob int `xorm:"NOT NULL DEFAULT 0"`
  613. GpuBenchMarkJob int `xorm:"NOT NULL DEFAULT 0"`
  614. CloudBrainRunTime int `xorm:"NOT NULL DEFAULT 0"`
  615. CommitDatasetNum int `xorm:"NOT NULL DEFAULT 0"`
  616. UserIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  617. UserIndexPrimitive float64 `xorm:"NOT NULL DEFAULT 0"`
  618. UserLocation string `xorm:"NULL"`
  619. FocusOtherUser int `xorm:"NOT NULL DEFAULT 0"`
  620. CollectDataset int `xorm:"NOT NULL DEFAULT 0"`
  621. CollectedDataset int `xorm:"NOT NULL DEFAULT 0"`
  622. RecommendDataset int `xorm:"NOT NULL DEFAULT 0"`
  623. CollectImage int `xorm:"NOT NULL DEFAULT 0"`
  624. CollectedImage int `xorm:"NOT NULL DEFAULT 0"`
  625. RecommendImage int `xorm:"NOT NULL DEFAULT 0"`
  626. Phone string `xorm:"NULL"`
  627. InvitationUserNum int `xorm:"NOT NULL DEFAULT 0"`
  628. ModelConvertCount int `xorm:"NOT NULL DEFAULT 0"`
  629. }