model.go 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. package model
  2. import (
  3. "time"
  4. )
  5. // BuglyIssue Issue Record.
  6. type BuglyIssue struct {
  7. ID int64 `json:"id" gorm:"auto_increment;primary_key;column:id"`
  8. IssueNo string `json:"issue_no" gorm:"column:issue_no"`
  9. Title string `json:"title" gorm:"column:title"`
  10. ExceptionMsg string `json:"exception_msg" gorm:"column:exception_msg"`
  11. KeyStack string `json:"key_stack" gorm:"column:key_stack"`
  12. Detail string `json:"detail" gorm:"column:detail"`
  13. Tags string `json:"tags" gorm:"column:tags"`
  14. LastTime time.Time `json:"last_time" gorm:"column:last_time"`
  15. HappenTimes int `json:"happen_times" gorm:"column:happen_times"`
  16. UserTimes int `json:"user_times" gorm:"column:user_times"`
  17. Version string `json:"version" gorm:"column:version"`
  18. ProjectID string `json:"project_id" gorm:"column:project_id"`
  19. IssueLink string `json:"issue_link" gorm:"column:issue_link"`
  20. TapdBugID string `json:"tapd_bug_id" gorm:"column:tapd_bug_id"`
  21. CTime time.Time `json:"ctime" gorm:"column:ctime"`
  22. MTime time.Time `json:"mtime" gorm:"column:mtime"`
  23. }
  24. // TapdProperty TapdProperty.
  25. type TapdProperty struct {
  26. Title string `json:"title" gorm:"column:title"`
  27. Description string `json:"description" gorm:"column:description"`
  28. CurrentOwner string `json:"current_owner" gorm:"column:current_owner"`
  29. Platform string `json:"platform" gorm:"column:platform"`
  30. Module string `json:"module" gorm:"column:module"`
  31. IterationID string `json:"iteration_id" gorm:"column:iteration_id"`
  32. ReleaseID string `json:"release_id" gorm:"column:release_id"`
  33. Priority string `json:"priority" gorm:"column:priority"`
  34. Severity string `json:"severity" gorm:"column:severity"`
  35. Source string `json:"source" gorm:"column:source"`
  36. CustomFieldFour string `json:"custom_field_four" gorm:"column:custom_field_four"`
  37. BugType string `json:"bugtype" gorm:"column:bugtype"`
  38. OriginPhase string `json:"originphase" gorm:"column:originphase"`
  39. CustomFieldThree string `json:"custom_field_three" gorm:"column:custom_field_three"`
  40. Reporter string `json:"reporter" gorm:"column:reporter"`
  41. Status string `json:"status" gorm:"column:status"`
  42. }
  43. // TapdBugTemplate TapdBugTemplate.
  44. type TapdBugTemplate struct {
  45. ID int64 `json:"id" gorm:"auto_increment;primary_key;column:id"`
  46. WorkspaceID string `json:"workspace_id" gorm:"column:workspace_id"`
  47. BuglyProjectId int64 `json:"bugly_project_id" gorm:"column:bugly_project_id"`
  48. TapdProperty
  49. IssueFilterSQL string `json:"issue_filter_sql" gorm:"column:issue_filter_sql"`
  50. SeverityKey string `json:"severity_key" gorm:"column:severity_key"`
  51. CTime time.Time `json:"ctime" gorm:"column:ctime"`
  52. MTime time.Time `json:"mtime" gorm:"column:mtime"`
  53. UpdateBy string `json:"update_by" gorm:"column:update_by"`
  54. }
  55. // TapdBugVersionTemplate TapdBugVersionTemplate.
  56. type TapdBugVersionTemplate struct {
  57. ID int64 `json:"id" gorm:"auto_increment;primary_key;column:id"`
  58. Version string `json:"version" gorm:"column:version"`
  59. ProjectTemplateID int64 `json:"project_template_id" gorm:"column:project_template_id"`
  60. TapdProperty
  61. IssueFilterSQL string `json:"issue_filter_sql" gorm:"column:issue_filter_sql"`
  62. SeverityKey string `json:"severity_key" gorm:"column:severity_key"`
  63. CTime time.Time `json:"ctime" gorm:"column:ctime"`
  64. MTime time.Time `json:"mtime" gorm:"column:mtime"`
  65. UpdateBy string `json:"update_by" gorm:"column:update_by"`
  66. }
  67. // BuglyVersion Bugly Version Record.
  68. type BuglyVersion struct {
  69. ID int64 `json:"id" gorm:"auto_increment;primary_key;column:id"`
  70. Version string `json:"version" gorm:"column:version"`
  71. BuglyProjectID int64 `json:"bugly_project_id" gorm:"column:bugly_project_id"`
  72. Action int `json:"action" gorm:"column:action"`
  73. TaskStatus int `json:"task_status" gorm:"column:task_status"`
  74. UpdateBy string `json:"update_by" gorm:"column:update_by"`
  75. CTime time.Time `json:"ctime" gorm:"column:ctime"`
  76. MTime time.Time `json:"mtime" gorm:"column:mtime"`
  77. }
  78. // BuglyBatchRun Bugly Batch Run.
  79. type BuglyBatchRun struct {
  80. ID int64 `json:"id" gorm:"auto_increment;primary_key;column:id"`
  81. BuglyVersionID int64 `json:"bugly_version_id" gorm:"column:bugly_version_id"`
  82. Version string `json:"version" gorm:"column:version"`
  83. BatchID string `json:"batch_id" gorm:"column:batch_id"`
  84. RetryCount int `json:"retry_count" gorm:"retry_times:retry_count"`
  85. Status int `json:"status" gorm:"column:status"`
  86. ErrorMsg string `json:"error_msg" gorm:"column:error_msg"`
  87. CTime time.Time `json:"ctime" gorm:"column:ctime"`
  88. MTime time.Time `json:"mtime" gorm:"column:mtime"`
  89. EndTime time.Time `json:"end_time" gorm:"column:end_time"`
  90. }
  91. // BuglyCookie Bugly Cookie.
  92. type BuglyCookie struct {
  93. ID int64 `json:"id" gorm:"auto_increment;primary_key;column:id"`
  94. QQAccount int `json:"qq_account" gorm:"column:qq_account"`
  95. Cookie string `json:"cookie" gorm:"column:cookie"`
  96. Token string `json:"token" gorm:"column:token"`
  97. UsageCount int `json:"usage_count" gorm:"column:usage_count"`
  98. Status int `json:"status" gorm:"column:status"`
  99. UpdateBy string `json:"update_by" gorm:"column:update_by"`
  100. CTime time.Time `json:"ctime" gorm:"column:ctime"`
  101. MTime time.Time `json:"mtime" gorm:"column:mtime"`
  102. }
  103. // User User.
  104. type User struct {
  105. ID int64 `json:"id" gorm:"auto_increment;primary_key;column:id"`
  106. Name string `json:"username" gorm:"column:name"`
  107. EMail string `json:"email" gorm:"column:email"`
  108. VisibleBugly bool `json:"visible_bugly" gorm:"column:visible_bugly"`
  109. CTime time.Time `gorm:"column:ctime;default:current_timestamp"`
  110. UTime time.Time `gorm:"column:mtime;default:current_timestamp on update current_timestamp"`
  111. }
  112. // TapdBugRecord Tapd Bug Insert Log.
  113. type TapdBugRecord struct {
  114. ID int64 `json:"id" gorm:"auto_increment;primary_key;column:id"`
  115. ProjectTemplateID int64 `json:"project_template_id" gorm:"column:project_template_id"`
  116. VersionTemplateID int64 `json:"version_template_id" gorm:"column:version_template_id"`
  117. Operator string `json:"operator" gorm:"column:operator"`
  118. Count int `json:"count" gorm:"column:count"`
  119. Status int `json:"status" gorm:"column:status"`
  120. IssueFilterSQL string `json:"issue_filter_sql" gorm:"column:issue_filter_sql"`
  121. CTime time.Time `json:"ctime" gorm:"column:ctime"`
  122. MTime time.Time `json:"mtime" gorm:"column:mtime"`
  123. }
  124. // ScheduleTask Schedule Task.
  125. type ScheduleTask struct {
  126. ID int64 `json:"id" gorm:"auto_increment;primary_key;column:id"`
  127. Name string `json:"username" gorm:"column:name"`
  128. Status int `json:"status" gorm:"column:status"`
  129. CTime time.Time `gorm:"column:ctime;default:current_timestamp"`
  130. MTime time.Time `gorm:"column:mtime;default:current_timestamp on update current_timestamp"`
  131. }
  132. // TapdBugPriorityConf Tapd Bug Priority Conf.
  133. type TapdBugPriorityConf struct {
  134. ID int64 `json:"id" gorm:"auto_increment;primary_key;column:id"`
  135. ProjectTemplateID int64 `json:"project_template_id" gorm:"column:project_template_id"`
  136. Urgent int `json:"urgent" gorm:"column:urgent"`
  137. High int `json:"high" gorm:"column:high"`
  138. Medium int `json:"medium" gorm:"column:medium"`
  139. StartTime time.Time `json:"start_time" gorm:"column:start_time"`
  140. EndTime time.Time `json:"end_time" gorm:"column:end_time"`
  141. CTime time.Time `json:"ctime" gorm:"column:ctime"`
  142. MTime time.Time `json:"mtime" gorm:"column:mtime"`
  143. UpdateBy string `json:"update_by" gorm:"column:update_by"`
  144. Status int `json:"status" gorm:"column:status"`
  145. }
  146. // ContactInfo Contact Info
  147. type ContactInfo struct {
  148. ID int64 `json:"id" gorm:"column:id"`
  149. UserName string `json:"username" gorm:"column:username"`
  150. UserID string `json:"user_id" gorm:"column:user_id"`
  151. NickName string `json:"nick_name" gorm:"column:nick_name"`
  152. CTime time.Time `json:"ctime" gorm:"column:ctime"`
  153. MTime time.Time `json:"mtime" gorm:"column:mtime"`
  154. }
  155. // BuglyProject Bugly Project.
  156. type BuglyProject struct {
  157. ID int64 `json:"id" gorm:"auto_increment;primary_key;column:id"`
  158. ProjectID string `json:"project_id" gorm:"column:project_id"`
  159. ProjectName string `json:"project_name" gorm:"column:project_name"`
  160. PlatformID string `json:"platform_id" gorm:"column:platform_id"`
  161. UpdateBy string `json:"update_by" gorm:"column:update_by"`
  162. ExceptionType string `json:"exception_type" gorm:"column:exception_type"`
  163. CTime time.Time `json:"ctime" gorm:"column:ctime"`
  164. MTime time.Time `json:"mtime" gorm:"column:mtime"`
  165. }