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