-
Notifications
You must be signed in to change notification settings - Fork 485
/
execution.go
225 lines (218 loc) · 10.2 KB
/
execution.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package models
import (
"github.com/apache/incubator-devlake/models/common"
"github.com/apache/incubator-devlake/plugins/helper"
)
type ZentaoExecutionRes struct {
ID int64 `json:"id"`
Project int64 `json:"project"`
Model string `json:"model"`
Type string `json:"type"`
Lifetime string `json:"lifetime"`
Budget string `json:"budget"`
BudgetUnit string `json:"budgetUnit"`
Attribute string `json:"attribute"`
Percent int `json:"percent"`
Milestone string `json:"milestone"`
Output string `json:"output"`
Auth string `json:"auth"`
Parent int64 `json:"parent"`
Path string `json:"path"`
Grade int `json:"grade"`
Name string `json:"name"`
Code string `json:"code"`
PlanBegin *helper.Iso8601Time `json:"begin"`
PlanEnd *helper.Iso8601Time `json:"end"`
RealBegan *helper.Iso8601Time `json:"realBegan"`
RealEnd *helper.Iso8601Time `json:"realEnd"`
Status string `json:"status"`
SubStatus string `json:"subStatus"`
Pri string `json:"pri"`
Description string `json:"desc"`
Version int `json:"version"`
ParentVersion int `json:"parentVersion"`
PlanDuration int `json:"planDuration"`
RealDuration int `json:"realDuration"`
OpenedBy *ZentaoAccount `json:"openedBy"`
OpenedDate *helper.Iso8601Time `json:"openedDate"`
OpenedVersion string `json:"openedVersion"`
LastEditedBy *ZentaoAccount `json:"lastEditedBy"`
LastEditedDate *helper.Iso8601Time `json:"lastEditedDate"`
ClosedBy *ZentaoAccount `json:"closedBy"`
ClosedDate *helper.Iso8601Time `json:"closedDate"`
CanceledBy *ZentaoAccount `json:"canceledBy"`
CanceledDate *helper.Iso8601Time `json:"canceledDate"`
SuspendedDate *helper.Iso8601Time `json:"suspendedDate"`
PO *ZentaoAccount `json:"PO"`
PM *ZentaoAccount `json:"PM"`
QD *ZentaoAccount `json:"QD"`
RD *ZentaoAccount `json:"RD"`
Team string `json:"team"`
Acl string `json:"acl"`
Whitelist []*ZentaoAccount `json:"whitelist"`
OrderIn int `json:"order"`
Vision string `json:"vision"`
DisplayCards int `json:"displayCards"`
FluidBoard string `json:"fluidBoard"`
Deleted bool `json:"deleted"`
TotalHours float64 `json:"totalHours"`
TotalEstimate float64 `json:"totalEstimate"`
TotalConsumed float64 `json:"totalConsumed"`
TotalLeft float64 `json:"totalLeft"`
ProjectInfo struct {
ID int64 `json:"id"`
Project int64 `json:"project"`
Model string `json:"model"`
Type string `json:"type"`
Lifetime string `json:"lifetime"`
Budget string `json:"budget"`
BudgetUnit string `json:"budgetUnit"`
Attribute string `json:"attribute"`
Percent int `json:"percent"`
Milestone string `json:"milestone"`
Output string `json:"output"`
Auth string `json:"auth"`
Parent int64 `json:"parent"`
Path string `json:"path"`
Grade int `json:"grade"`
Name string `json:"name"`
Code string `json:"code"`
PlanBegin *helper.Iso8601Time `json:"begin"`
PlanEnd *helper.Iso8601Time `json:"end"`
RealBegan *helper.Iso8601Time `json:"realBegan"`
RealEnd *helper.Iso8601Time `json:"realEnd"`
Status string `json:"status"`
SubStatus string `json:"subStatus"`
Pri string `json:"pri"`
Description string `json:"desc"`
Version int `json:"version"`
ParentVersion int `json:"parentVersion"`
PlanDuration int `json:"planDuration"`
RealDuration int `json:"realDuration"`
OpenedBy string `json:"openedBy"`
OpenedDate *helper.Iso8601Time `json:"openedDate"`
OpenedVersion string `json:"openedVersion"`
LastEditedBy string `json:"lastEditedBy"`
LastEditedDate *helper.Iso8601Time `json:"lastEditedDate"`
ClosedBy string `json:"closedBy"`
ClosedDate *helper.Iso8601Time `json:"closedDate"`
CanceledBy string `json:"canceledBy"`
CanceledDate *helper.Iso8601Time `json:"canceledDate"`
SuspendedDate *helper.Iso8601Time `json:"suspendedDate"`
PO string `json:"PO"`
PM string `json:"PM"`
QD string `json:"QD"`
RD string `json:"RD"`
Team string `json:"team"`
Acl string `json:"acl"`
Whitelist string `json:"whitelist"`
OrderIn int `json:"order"`
Vision string `json:"vision"`
DisplayCards int `json:"displayCards"`
FluidBoard string `json:"fluidBoard"`
Deleted string `json:"deleted"`
} `json:"projectInfo"`
Progress float64 `json:"progress"`
TeamMembers []struct {
ID int64 `json:"id"`
Root int `json:"root"`
Type string `json:"type"`
Account string `json:"account"`
Role string `json:"role"`
Position string `json:"position"`
Limited string `json:"limited"`
Join string `json:"join"`
Hours int `json:"hours"`
Estimate string `json:"estimate"`
Consumed string `json:"consumed"`
Left string `json:"left"`
OrderIn int `json:"order"`
TotalHours float64 `json:"totalHours"`
UserID int64 `json:"userID"`
Realname string `json:"realname"`
} `json:"teamMembers"`
Products []struct {
ID int64 `json:"id"`
Name string `json:"name"`
Plans []interface{} `json:"plans"`
} `json:"products"`
CaseReview bool `json:"caseReview"`
}
type ZentaoExecution struct {
ConnectionId uint64 `gorm:"primaryKey;type:BIGINT NOT NULL"`
Id int64 `json:"id" gorm:"primaryKey;type:BIGINT NOT NULL"`
Project int64 `json:"project"`
Model string `json:"model"`
Type string `json:"type"`
Lifetime string `json:"lifetime"`
Budget string `json:"budget"`
BudgetUnit string `json:"budgetUnit"`
Attribute string `json:"attribute"`
Percent int `json:"percent"`
Milestone string `json:"milestone"`
Output string `json:"output"`
Auth string `json:"auth"`
Parent int64 `json:"parent"`
Path string `json:"path"`
Grade int `json:"grade"`
Name string `json:"name"`
Code string `json:"code"`
PlanBegin *helper.Iso8601Time `json:"begin"`
PlanEnd *helper.Iso8601Time `json:"end"`
RealBegan *helper.Iso8601Time `json:"realBegan"`
RealEnd *helper.Iso8601Time `json:"realEnd"`
Status string `json:"status"`
SubStatus string `json:"subStatus"`
Pri string `json:"pri"`
Description string `json:"desc"`
Version int `json:"version"`
ParentVersion int `json:"parentVersion"`
PlanDuration int `json:"planDuration"`
RealDuration int `json:"realDuration"`
OpenedById int64
OpenedDate *helper.Iso8601Time `json:"openedDate"`
OpenedVersion string `json:"openedVersion"`
LastEditedById int64
LastEditedDate *helper.Iso8601Time `json:"lastEditedDate"`
ClosedById int64
ClosedDate *helper.Iso8601Time `json:"closedDate"`
CanceledById int64
CanceledDate *helper.Iso8601Time `json:"canceledDate"`
SuspendedDate *helper.Iso8601Time `json:"suspendedDate"`
POId int64
PMId int64
QDId int64
RDId int64
Team string `json:"team"`
Acl string `json:"acl"`
OrderIn int `json:"order"`
Vision string `json:"vision"`
DisplayCards int `json:"displayCards"`
FluidBoard string `json:"fluidBoard"`
Deleted bool `json:"deleted"`
TotalHours float64 `json:"totalHours"`
TotalEstimate float64 `json:"totalEstimate"`
TotalConsumed float64 `json:"totalConsumed"`
TotalLeft float64 `json:"totalLeft"`
ProjectId int64
Progress float64 `json:"progress"`
CaseReview bool `json:"caseReview"`
common.NoPKModel
}
func (ZentaoExecution) TableName() string {
return "_tool_zentao_executions"
}