tapd.go 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. package model
  2. //IterationResponse response for tapd iteration query
  3. type IterationResponse struct {
  4. Status int `json:"status"`
  5. Data []*IterationWrapper `json:"data"`
  6. Info string `json:"info"`
  7. }
  8. //IterationWrapper sub struct in IterationResponse
  9. type IterationWrapper struct {
  10. Iteration *Iteration `json:"iteration"`
  11. }
  12. //Iteration tapd iteration
  13. //type Iteration struct {
  14. // ID string `json:"id"`
  15. // Name string `json:"name"`
  16. // StartDate string `json:"startdate"`
  17. // EndDate string `json:"enddate"`
  18. //}
  19. //Iteration tapd iteration
  20. type Iteration struct {
  21. ID string `json:"id"`
  22. Name string `json:"name"`
  23. WorkspaceID string `json:"workspace_id"`
  24. Startdate string `json:"startdate"`
  25. Enddate string `json:"enddate"`
  26. Status string `json:"status"`
  27. ReleaseID string `json:"release_id"`
  28. Description string `json:"description"`
  29. Creator string `json:"creator"`
  30. Created string `json:"created"`
  31. Modified string `json:"modified"`
  32. Completed string `json:"completed"`
  33. CustomField1 string `json:"custom_field_1"`
  34. CustomField2 string `json:"custom_field_2"`
  35. CustomField3 string `json:"custom_field_3"`
  36. CustomField4 string `json:"custom_field_4"`
  37. CustomField5 string `json:"custom_field_5"`
  38. CustomField6 string `json:"custom_field_6"`
  39. CustomField7 string `json:"custom_field_7"`
  40. CustomField8 string `json:"custom_field_8"`
  41. CustomField9 string `json:"custom_field_9"`
  42. CustomField10 string `json:"custom_field_10"`
  43. CustomField11 string `json:"custom_field_11"`
  44. CustomField12 string `json:"custom_field_12"`
  45. CustomField13 string `json:"custom_field_13"`
  46. CustomField14 string `json:"custom_field_14"`
  47. CustomField15 string `json:"custom_field_15"`
  48. CustomField16 string `json:"custom_field_16"`
  49. CustomField17 string `json:"custom_field_17"`
  50. CustomField18 string `json:"custom_field_18"`
  51. CustomField19 string `json:"custom_field_19"`
  52. CustomField20 string `json:"custom_field_20"`
  53. CustomField21 string `json:"custom_field_21"`
  54. CustomField22 string `json:"custom_field_22"`
  55. CustomField23 string `json:"custom_field_23"`
  56. CustomField24 string `json:"custom_field_24"`
  57. CustomField25 string `json:"custom_field_25"`
  58. CustomField26 string `json:"custom_field_26"`
  59. CustomField27 string `json:"custom_field_27"`
  60. CustomField28 string `json:"custom_field_28"`
  61. CustomField29 string `json:"custom_field_29"`
  62. CustomField30 string `json:"custom_field_30"`
  63. CustomField31 string `json:"custom_field_31"`
  64. CustomField32 string `json:"custom_field_32"`
  65. CustomField33 string `json:"custom_field_33"`
  66. CustomField34 string `json:"custom_field_34"`
  67. CustomField35 string `json:"custom_field_35"`
  68. CustomField36 string `json:"custom_field_36"`
  69. CustomField37 string `json:"custom_field_37"`
  70. CustomField38 string `json:"custom_field_38"`
  71. CustomField39 string `json:"custom_field_39"`
  72. CustomField40 string `json:"custom_field_40"`
  73. CustomField41 string `json:"custom_field_41"`
  74. CustomField42 string `json:"custom_field_42"`
  75. CustomField43 string `json:"custom_field_43"`
  76. CustomField44 string `json:"custom_field_44"`
  77. CustomField45 string `json:"custom_field_45"`
  78. CustomField46 string `json:"custom_field_46"`
  79. CustomField47 string `json:"custom_field_47"`
  80. CustomField48 string `json:"custom_field_48"`
  81. CustomField49 string `json:"custom_field_49"`
  82. CustomField50 string `json:"custom_field_50"`
  83. }
  84. //StoryResponse response for tapd multiple stories query
  85. type StoryResponse struct {
  86. Status int `json:"status"`
  87. Data []*StoryWrapper `json:"data"`
  88. Info string `json:"info"`
  89. }
  90. //SpecStoryResponse response for tapd specific story query
  91. type SpecStoryResponse struct {
  92. Status int `json:"status"`
  93. Data *StoryWrapper `json:"data"`
  94. Info string `json:"info"`
  95. }
  96. //StoryWrapper sub struct in story response
  97. type StoryWrapper struct {
  98. Story *Story `json:"story"`
  99. }
  100. //Story tapd story
  101. type Story struct {
  102. ID string `json:"id"`
  103. Name string `json:"name"`
  104. WorkspaceID string `json:"workspace_id"`
  105. Creator string `json:"creator"`
  106. Created string `json:"created"`
  107. Modified string `json:"modified"`
  108. Status string `json:"status"`
  109. Owner string `json:"owner"`
  110. Cc string `json:"cc"`
  111. Begin string `json:"begin"`
  112. Due string `json:"due"`
  113. Size string `json:"size"`
  114. Priority string `json:"priority"`
  115. Developer string `json:"developer"`
  116. IterationID string `json:"iteration_id"`
  117. TestFocus string `json:"test_focus"`
  118. Type string `json:"type"`
  119. Source string `json:"source"`
  120. Module string `json:"module"`
  121. Version string `json:"version"`
  122. Completed string `json:"completed"`
  123. CategoryID string `json:"category_id"`
  124. ParentID string `json:"parent_id"`
  125. ChildrenID string `json:"children_id"`
  126. AncestorID string `json:"ancestor_id"`
  127. BusinessValue string `json:"business_value"`
  128. Effort string `json:"effort"`
  129. EffortCompleted string `json:"effort_completed"`
  130. Exceed string `json:"exceed"`
  131. Remain string `json:"remain"`
  132. ReleaseID string `json:"release_id"`
  133. CustomFieldOne string `json:"custom_field_one"`
  134. CustomFieldTwo string `json:"custom_field_two"`
  135. CustomFieldThree string `json:"custom_field_three"`
  136. CustomFieldFour string `json:"custom_field_four"`
  137. CustomFieldFive string `json:"custom_field_five"`
  138. CustomFieldSix string `json:"custom_field_six"`
  139. CustomFieldSeven string `json:"custom_field_seven"`
  140. CustomFieldEight string `json:"custom_field_eight"`
  141. CustomField9 string `json:"custom_field_9"`
  142. CustomField10 string `json:"custom_field_10"`
  143. CustomField11 string `json:"custom_field_11"`
  144. CustomField12 string `json:"custom_field_12"`
  145. CustomField13 string `json:"custom_field_13"`
  146. CustomField14 string `json:"custom_field_14"`
  147. CustomField15 string `json:"custom_field_15"`
  148. CustomField16 string `json:"custom_field_16"`
  149. CustomField17 string `json:"custom_field_17"`
  150. CustomField18 string `json:"custom_field_18"`
  151. CustomField19 string `json:"custom_field_19"`
  152. CustomField20 string `json:"custom_field_20"`
  153. CustomField21 string `json:"custom_field_21"`
  154. CustomField22 string `json:"custom_field_22"`
  155. CustomField23 string `json:"custom_field_23"`
  156. CustomField24 string `json:"custom_field_24"`
  157. CustomField25 string `json:"custom_field_25"`
  158. CustomField26 string `json:"custom_field_26"`
  159. CustomField27 string `json:"custom_field_27"`
  160. CustomField28 string `json:"custom_field_28"`
  161. CustomField29 string `json:"custom_field_29"`
  162. CustomField30 string `json:"custom_field_30"`
  163. CustomField31 string `json:"custom_field_31"`
  164. CustomField32 string `json:"custom_field_32"`
  165. CustomField33 string `json:"custom_field_33"`
  166. CustomField34 string `json:"custom_field_34"`
  167. CustomField35 string `json:"custom_field_35"`
  168. CustomField36 string `json:"custom_field_36"`
  169. CustomField37 string `json:"custom_field_37"`
  170. CustomField38 string `json:"custom_field_38"`
  171. CustomField39 string `json:"custom_field_39"`
  172. CustomField40 string `json:"custom_field_40"`
  173. CustomField41 string `json:"custom_field_41"`
  174. CustomField42 string `json:"custom_field_42"`
  175. CustomField43 string `json:"custom_field_43"`
  176. CustomField44 string `json:"custom_field_44"`
  177. CustomField45 string `json:"custom_field_45"`
  178. CustomField46 string `json:"custom_field_46"`
  179. CustomField47 string `json:"custom_field_47"`
  180. CustomField48 string `json:"custom_field_48"`
  181. CustomField49 string `json:"custom_field_49"`
  182. CustomField50 string `json:"custom_field_50"`
  183. CustomField51 string `json:"custom_field_51"`
  184. CustomField52 string `json:"custom_field_52"`
  185. CustomField53 string `json:"custom_field_53"`
  186. CustomField54 string `json:"custom_field_54"`
  187. CustomField55 string `json:"custom_field_55"`
  188. CustomField56 string `json:"custom_field_56"`
  189. CustomField57 string `json:"custom_field_57"`
  190. CustomField58 string `json:"custom_field_58"`
  191. CustomField59 string `json:"custom_field_59"`
  192. CustomField60 string `json:"custom_field_60"`
  193. CustomField61 string `json:"custom_field_61"`
  194. CustomField62 string `json:"custom_field_62"`
  195. CustomField63 string `json:"custom_field_63"`
  196. CustomField64 string `json:"custom_field_64"`
  197. CustomField65 string `json:"custom_field_65"`
  198. CustomField66 string `json:"custom_field_66"`
  199. CustomField67 string `json:"custom_field_67"`
  200. CustomField68 string `json:"custom_field_68"`
  201. CustomField69 string `json:"custom_field_69"`
  202. CustomField70 string `json:"custom_field_70"`
  203. CustomField71 string `json:"custom_field_71"`
  204. CustomField72 string `json:"custom_field_72"`
  205. CustomField73 string `json:"custom_field_73"`
  206. CustomField74 string `json:"custom_field_74"`
  207. CustomField75 string `json:"custom_field_75"`
  208. CustomField76 string `json:"custom_field_76"`
  209. CustomField77 string `json:"custom_field_77"`
  210. CustomField78 string `json:"custom_field_78"`
  211. CustomField79 string `json:"custom_field_79"`
  212. CustomField80 string `json:"custom_field_80"`
  213. CustomField81 string `json:"custom_field_81"`
  214. CustomField82 string `json:"custom_field_82"`
  215. CustomField83 string `json:"custom_field_83"`
  216. CustomField84 string `json:"custom_field_84"`
  217. CustomField85 string `json:"custom_field_85"`
  218. CustomField86 string `json:"custom_field_86"`
  219. CustomField87 string `json:"custom_field_87"`
  220. CustomField88 string `json:"custom_field_88"`
  221. CustomField89 string `json:"custom_field_89"`
  222. CustomField90 string `json:"custom_field_90"`
  223. CustomField91 string `json:"custom_field_91"`
  224. CustomField92 string `json:"custom_field_92"`
  225. CustomField93 string `json:"custom_field_93"`
  226. CustomField94 string `json:"custom_field_94"`
  227. CustomField95 string `json:"custom_field_95"`
  228. CustomField96 string `json:"custom_field_96"`
  229. CustomField97 string `json:"custom_field_97"`
  230. CustomField98 string `json:"custom_field_98"`
  231. CustomField99 string `json:"custom_field_99"`
  232. CustomField100 string `json:"custom_field_100"`
  233. }
  234. //IOSStory additional fields for ios story
  235. type IOSStory struct {
  236. CustomField99 string `json:"custom_field_99"` //接口上线日
  237. CustomField97 string `json:"custom_field_97"` //双端都提得需求
  238. CustomField93 string `json:"custom_field_93"` //端范围(默认仅粉iPhone)
  239. CustomField92 string `json:"custom_field_92"` //是否可以单端上线
  240. }
  241. //AndroidStory additional fields for android story
  242. type AndroidStory struct {
  243. CustomField99 string `json:"custom_field_99"` //接口上线日
  244. CustomField97 string `json:"custom_field_97"` //双端都提得需求
  245. CustomField93 string `json:"custom_field_93"` //是否可以单端上线
  246. }
  247. // ReleaseResponse Release Response
  248. type ReleaseResponse struct {
  249. Status int `json:"status"`
  250. Data *ReleaseWrapper `json:"data"`
  251. Info string `json:"info"`
  252. }
  253. // ReleaseWrapper Release Wrapper
  254. type ReleaseWrapper struct {
  255. Release *Release `json:"Release"`
  256. }
  257. // Release Release
  258. type Release struct {
  259. ID string `json:"id"`
  260. WorkSpaceID string `json:"workspace_id"`
  261. Name string `json:"name"`
  262. Description string `json:"description"`
  263. StartDate string `json:"startdate"`
  264. EndDate string `json:"enddate"`
  265. Creator string `json:"creator"`
  266. Created string `json:"created"`
  267. Modified string `json:"modified"`
  268. Status string `json:"status"`
  269. }
  270. // BugResponse Bug Response
  271. type BugResponse struct {
  272. Status int `json:"status"`
  273. Data []*BugWrapper `json:"data"`
  274. Info string `json:"info"`
  275. }
  276. // BugSingleResponse Bug Response
  277. type BugSingleResponse struct {
  278. Status int `json:"status"`
  279. Data *BugWrapper `json:"data"`
  280. Info string `json:"info"`
  281. }
  282. // BugWrapper Bug Wrapper
  283. type BugWrapper struct {
  284. Bug *Bug `json:"Bug"`
  285. }
  286. // Bug Bug
  287. type Bug struct {
  288. ID string `json:"id"`
  289. Title string `json:"title"`
  290. Description string `json:"description"`
  291. Priority string `json:"priority"`
  292. Severity string `json:"severity"`
  293. Module string `json:"module"`
  294. Status string `json:"status"`
  295. Reporter string `json:"reporter"`
  296. Deadline string `json:"deadline"`
  297. Created string `json:"created"`
  298. BugType string `json:"bugtype"`
  299. Resolved string `json:"resolved"`
  300. Closed string `json:"closed"`
  301. Modified string `json:"modified"`
  302. LastModify string `json:"lastmodify"`
  303. Auditer string `json:"auditer"`
  304. DE string `json:"de"`
  305. VersionTest string `json:"version_test"`
  306. VersionReport string `json:"version_report"`
  307. VersionClose string `json:"version_close"`
  308. VersionFix string `json:"version_fix"`
  309. BaselineFind string `json:"baseline_find"`
  310. BaselineJoin string `json:"baseline_join"`
  311. BaselineClose string `json:"baseline_close"`
  312. BaselineTest string `json:"baseline_test"`
  313. SourcePhase string `json:"sourcephase"`
  314. TE string `json:"te"`
  315. CurrentOwner string `json:"current_owner"`
  316. IterationID string `json:"iteration_id"`
  317. Resolution string `json:"resolution"`
  318. Source string `json:"source"`
  319. OriginPhase string `json:"originphase"`
  320. Confirmer string `json:"confirmer"`
  321. Milestone string `json:"milestone"`
  322. Participator string `json:"participator"`
  323. Closer string `json:"closer"`
  324. Platform string `json:"platform"`
  325. OS string `json:"os"`
  326. TestType string `json:"testtype"`
  327. TestPhase string `json:"testphase"`
  328. Frequency string `json:"frequency"`
  329. CC string `json:"cc"`
  330. RegressionNumber string `json:"regression_number"`
  331. Flows string `json:"flows"`
  332. Feature string `json:"feature"`
  333. TestMode string `json:"testmode"`
  334. Estimate string `json:"estimate"`
  335. IssueID string `json:"issue_id"`
  336. CreatedFrom string `json:"created_from"`
  337. InProgressTime string `json:"in_progress_time"`
  338. VerifyTime string `json:"verify_time"`
  339. RejectTime string `json:"reject_time"`
  340. ReopenTime string `json:"reopen_time"`
  341. AuditTime string `json:"audit_time"`
  342. SuspendTime string `json:"suspend_time"`
  343. Due string `json:"due"`
  344. Begin string `json:"begin"`
  345. ReleaseID string `json:"release_id"`
  346. WorkspaceID string `json:"workspace_id"`
  347. CustomFieldOne string `json:"custom_field_one"`
  348. CustomFieldTwo string `json:"custom_field_two"`
  349. CustomFieldThree string `json:"custom_field_three"`
  350. CustomFieldFour string `json:"custom_field_four"`
  351. CustomFieldFive string `json:"custom_field_five"`
  352. CustomField6 string `json:"custom_field_6"`
  353. CustomField7 string `json:"custom_field_7"`
  354. CustomField8 string `json:"custom_field_8"`
  355. CustomField9 string `json:"custom_field_9"`
  356. CustomField10 string `json:"custom_field_10"`
  357. CustomField11 string `json:"custom_field_11"`
  358. CustomField12 string `json:"custom_field_12"`
  359. CustomField13 string `json:"custom_field_13"`
  360. CustomField14 string `json:"custom_field_14"`
  361. CustomField15 string `json:"custom_field_15"`
  362. CustomField16 string `json:"custom_field_16"`
  363. CustomField17 string `json:"custom_field_17"`
  364. CustomField18 string `json:"custom_field_18"`
  365. CustomField19 string `json:"custom_field_19"`
  366. CustomField20 string `json:"custom_field_20"`
  367. CustomField21 string `json:"custom_field_21"`
  368. CustomField22 string `json:"custom_field_22"`
  369. CustomField23 string `json:"custom_field_23"`
  370. CustomField24 string `json:"custom_field_24"`
  371. CustomField25 string `json:"custom_field_25"`
  372. CustomField26 string `json:"custom_field_26"`
  373. CustomField27 string `json:"custom_field_27"`
  374. CustomField28 string `json:"custom_field_28"`
  375. CustomField29 string `json:"custom_field_29"`
  376. CustomField30 string `json:"custom_field_30"`
  377. CustomField31 string `json:"custom_field_31"`
  378. CustomField32 string `json:"custom_field_32"`
  379. CustomField33 string `json:"custom_field_33"`
  380. CustomField34 string `json:"custom_field_34"`
  381. CustomField35 string `json:"custom_field_35"`
  382. CustomField36 string `json:"custom_field_36"`
  383. CustomField37 string `json:"custom_field_37"`
  384. CustomField38 string `json:"custom_field_38"`
  385. CustomField39 string `json:"custom_field_39"`
  386. CustomField40 string `json:"custom_field_40"`
  387. CustomField41 string `json:"custom_field_41"`
  388. CustomField42 string `json:"custom_field_42"`
  389. CustomField43 string `json:"custom_field_43"`
  390. CustomField44 string `json:"custom_field_44"`
  391. CustomField45 string `json:"custom_field_45"`
  392. CustomField46 string `json:"custom_field_46"`
  393. CustomField47 string `json:"custom_field_47"`
  394. CustomField48 string `json:"custom_field_48"`
  395. CustomField49 string `json:"custom_field_49"`
  396. CustomField50 string `json:"custom_field_50"`
  397. }
  398. // UpdateBug Update Bug
  399. type UpdateBug struct {
  400. *Bug
  401. CurrentUser string `json:"current_user"`
  402. }
  403. //StoryChangeResponse response for tapd story change query
  404. type StoryChangeResponse struct {
  405. Status int `json:"status"`
  406. Data []*WorkitemChangeWrapper `json:"data"`
  407. Info string `json:"info"`
  408. }
  409. //WorkitemChangeWrapper sub struct in StoryChangeResponse
  410. type WorkitemChangeWrapper struct {
  411. WorkitemChange *WorkitemChange `json:"WorkitemChange"`
  412. }
  413. //WorkitemChange sub struct in WorkitemChangeWrapper
  414. type WorkitemChange struct {
  415. ID string `json:"id"`
  416. WorkspaceID string `json:"workspace_id"`
  417. Creator string `json:"creator"`
  418. Created string `json:"created"`
  419. ChangeSummay string `json:"change_summay"`
  420. Comment string `json:"comment"`
  421. Changes string `json:"changes"`
  422. EntityType string `json:"entity_type"`
  423. StoryID string `json:"story_id"`
  424. }
  425. //StoryChangeItem story change struct wrote to change file
  426. type StoryChangeItem struct {
  427. ID string
  428. WorkspaceID string
  429. StoryID string
  430. Number string
  431. Field string
  432. Creator string
  433. Created string
  434. ValueBefore string
  435. ValueAfter string
  436. ChangeSummay string
  437. Comment string
  438. EntityType string
  439. }
  440. //StoryChangeByIteration story changes organized by iteration
  441. type StoryChangeByIteration struct {
  442. IterationName string
  443. StoryCount int
  444. StoryChangeList []*TargetStoryChange
  445. }
  446. //TargetStoryChange story and story changes
  447. type TargetStoryChange struct {
  448. Story *Story
  449. StatusChanges []*StatusChange
  450. }
  451. //StatusChange story change
  452. type StatusChange struct {
  453. Creator string
  454. Created string
  455. ValueBefore string
  456. ValueAfter string
  457. }
  458. //NameMapResponse story status name mapping
  459. type NameMapResponse struct {
  460. Status int `json:"status"`
  461. Data map[string]string `json:"data"`
  462. Info string
  463. }
  464. //RejectedStoryByIteration rejected stories organized by iteration
  465. type RejectedStoryByIteration struct {
  466. IterationName string
  467. RejectedStoryCount int
  468. RejectedStoryList []string
  469. }
  470. //TestTimeByIteration stories' test time info organized by iteration
  471. type TestTimeByIteration struct {
  472. IterationName string
  473. StoryCount int
  474. TimeByStroy []*TestTimeByStory
  475. }
  476. //TestTimeByStory story base info and test time
  477. type TestTimeByStory struct {
  478. StoryName string
  479. StorySize string
  480. StoryEffort string
  481. TestTime float64
  482. }
  483. //WaitTimeByIteration stories' wait time organized by iteration
  484. type WaitTimeByIteration struct {
  485. IterationName string
  486. StoryCount int
  487. TimeByStroy []*WaitTimeByStory
  488. }
  489. //WaitTimeByStory story base info and wait time
  490. type WaitTimeByStory struct {
  491. StoryName string
  492. StorySize string
  493. StoryEffort string
  494. WaitTime float64
  495. }
  496. //CategoryResponse response for tapd category query
  497. type CategoryResponse struct {
  498. Status int `json:"status"`
  499. Data []*CategoryWrapper `json:"data"`
  500. Info string `json:"info"`
  501. }
  502. //CategoryPreResponse response for tapd category query
  503. type CategoryPreResponse struct {
  504. Status int `json:"status"`
  505. Data *CategoryWrapper `json:"data"`
  506. Info string `json:"info"`
  507. }
  508. //CategoryWrapper sub struct in CategoryResponse
  509. type CategoryWrapper struct {
  510. Category *Category
  511. }
  512. //Category project category
  513. type Category struct {
  514. ID string `json:"id"`
  515. Name string `json:"name"`
  516. }