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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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. }
  46. type UserBusinessAnalysisLast30Day struct {
  47. ID int64 `xorm:"pk"`
  48. CountDate int64 `xorm:"pk"`
  49. //action :ActionMergePullRequest // 11
  50. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  51. //action :ActionCommitRepo
  52. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  53. //issue // 10
  54. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  55. //comment table current date
  56. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  57. //watch table current date
  58. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  59. //star table current date
  60. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  61. //follow table
  62. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  63. // user table
  64. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  65. //
  66. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  67. //attachement table
  68. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  69. //0
  70. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  71. //issue, issueassignees
  72. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  73. //baike
  74. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  75. //user
  76. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  77. //repo
  78. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  79. //login count, from elk
  80. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  81. //openi index
  82. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  83. //user
  84. Email string `xorm:"NOT NULL"`
  85. //user
  86. Name string `xorm:"NOT NULL"`
  87. DataDate string `xorm:"NULL"`
  88. }
  89. type UserBusinessAnalysisLastMonth struct {
  90. ID int64 `xorm:"pk"`
  91. CountDate int64 `xorm:"pk"`
  92. //action :ActionMergePullRequest // 11
  93. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  94. //action :ActionCommitRepo
  95. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  96. //issue // 10
  97. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  98. //comment table current date
  99. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  100. //watch table current date
  101. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  102. //star table current date
  103. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  104. //follow table
  105. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  106. // user table
  107. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  108. //
  109. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  110. //attachement table
  111. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  112. //0
  113. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  114. //issue, issueassignees
  115. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  116. //baike
  117. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  118. //user
  119. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  120. //repo
  121. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  122. //login count, from elk
  123. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  124. //openi index
  125. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  126. //user
  127. Email string `xorm:"NOT NULL"`
  128. //user
  129. Name string `xorm:"NOT NULL"`
  130. DataDate string `xorm:"NULL"`
  131. }
  132. type UserBusinessAnalysisCurrentMonth struct {
  133. ID int64 `xorm:"pk"`
  134. CountDate int64 `xorm:"pk"`
  135. //action :ActionMergePullRequest // 11
  136. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  137. //action :ActionCommitRepo
  138. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  139. //issue // 10
  140. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  141. //comment table current date
  142. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  143. //watch table current date
  144. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  145. //star table current date
  146. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  147. //follow table
  148. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  149. // user table
  150. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  151. //
  152. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  153. //attachement table
  154. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  155. //0
  156. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  157. //issue, issueassignees
  158. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  159. //baike
  160. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  161. //user
  162. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  163. //repo
  164. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  165. //login count, from elk
  166. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  167. //openi index
  168. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  169. //user
  170. Email string `xorm:"NOT NULL"`
  171. //user
  172. Name string `xorm:"NOT NULL"`
  173. DataDate string `xorm:"NULL"`
  174. }
  175. type UserBusinessAnalysisCurrentWeek struct {
  176. ID int64 `xorm:"pk"`
  177. CountDate int64 `xorm:"pk"`
  178. //action :ActionMergePullRequest // 11
  179. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  180. //action :ActionCommitRepo
  181. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  182. //issue // 10
  183. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  184. //comment table current date
  185. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  186. //watch table current date
  187. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  188. //star table current date
  189. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  190. //follow table
  191. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  192. // user table
  193. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  194. //
  195. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  196. //attachement table
  197. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  198. //0
  199. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  200. //issue, issueassignees
  201. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  202. //baike
  203. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  204. //user
  205. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  206. //repo
  207. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  208. //login count, from elk
  209. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  210. //openi index
  211. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  212. //user
  213. Email string `xorm:"NOT NULL"`
  214. //user
  215. Name string `xorm:"NOT NULL"`
  216. DataDate string `xorm:"NULL"`
  217. }
  218. type UserBusinessAnalysisYesterday struct {
  219. ID int64 `xorm:"pk"`
  220. CountDate int64 `xorm:"pk"`
  221. //action :ActionMergePullRequest // 11
  222. CodeMergeCount int `xorm:"NOT NULL DEFAULT 0"`
  223. //action :ActionCommitRepo
  224. CommitCount int `xorm:"NOT NULL DEFAULT 0"`
  225. //issue // 10
  226. IssueCount int `xorm:"NOT NULL DEFAULT 0"`
  227. //comment table current date
  228. CommentCount int `xorm:"NOT NULL DEFAULT 0"`
  229. //watch table current date
  230. FocusRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  231. //star table current date
  232. StarRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  233. //follow table
  234. WatchedCount int `xorm:"NOT NULL DEFAULT 0"`
  235. // user table
  236. GiteaAgeMonth int `xorm:"NOT NULL DEFAULT 0"`
  237. //
  238. CommitCodeSize int `xorm:"NOT NULL DEFAULT 0"`
  239. //attachement table
  240. CommitDatasetSize int `xorm:"NOT NULL DEFAULT 0"`
  241. //0
  242. CommitModelCount int `xorm:"NOT NULL DEFAULT 0"`
  243. //issue, issueassignees
  244. SolveIssueCount int `xorm:"NOT NULL DEFAULT 0"`
  245. //baike
  246. EncyclopediasCount int `xorm:"NOT NULL DEFAULT 0"`
  247. //user
  248. RegistDate timeutil.TimeStamp `xorm:"NOT NULL"`
  249. //repo
  250. CreateRepoCount int `xorm:"NOT NULL DEFAULT 0"`
  251. //login count, from elk
  252. LoginCount int `xorm:"NOT NULL DEFAULT 0"`
  253. //openi index
  254. OpenIIndex float64 `xorm:"NOT NULL DEFAULT 0"`
  255. //user
  256. Email string `xorm:"NOT NULL"`
  257. //user
  258. Name string `xorm:"NOT NULL"`
  259. DataDate string `xorm:"NULL"`
  260. }