forked from amborle/featmap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
model.go
200 lines (185 loc) · 9.56 KB
/
model.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
package main
import "time"
// Workspace ...
type Workspace struct {
ID string `db:"id" json:"id"`
Name string `db:"name" json:"name"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
AllowExternalSharing bool `db:"allow_external_sharing" json:"allowExternalSharing"`
ExternalCustomerID string `db:"external_customer_id" json:"-"`
EUVAT string `db:"eu_vat" json:"euVat"`
ExternalBillingEmail string `db:"external_billing_email" json:"externalBillingEmail"`
}
// Account ...
type Account struct {
ID string `db:"id" json:"id"`
Name string `db:"name" json:"name"`
Email string `db:"email" json:"email"`
Password string `db:"password" json:"-"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
EmailConfirmed bool `db:"email_confirmed" json:"emailConfirmed"`
EmailConfirmationSentTo string `db:"email_confirmation_sent_to" json:"emailConfirmationSentTo"`
EmailConfirmationKey string `db:"email_confirmation_key" json:"-"`
EmailConfirmationPending bool `db:"email_confirmation_pending" json:"emailConfirmationPending"`
PasswordResetKey string `db:"password_reset_key" json:"-"`
LatestActivity time.Time `db:"latest_activity" json:"-"`
}
// Subscription ...
type Subscription struct {
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
ID string `db:"id" json:"id"`
Level string `db:"level" json:"level"`
NumberOfEditors int `db:"number_of_editors" json:"numberOfEditors"`
FromDate time.Time `db:"from_date" json:"fromDate"`
ExpirationDate time.Time `db:"expiration_date" json:"expirationDate"`
CreatedByName string `db:"created_by_name" json:"createdByName"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
LastModified time.Time `db:"last_modified" json:"lastModified"`
LastModifiedByName string `db:"last_modified_by_name" json:"lastModifiedByName"`
Status string `db:"status" json:"externalStatus"`
ExternalCustomerID string `db:"external_customer_id" json:"-"`
ExternalPlanID string `db:"external_plan_id" json:"-"`
ExternalSubscriptionID string `db:"external_subscription_id" json:"-"`
ExternalSubscriptionItemID string `db:"external_subscription_item_id" json:"-"`
}
// Member ...
type Member struct {
ID string `db:"id" json:"id"`
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
AccountID string `db:"account_id" json:"accountId"`
Level string `db:"level" json:"level"`
Name string `db:"name" json:"name"` // Joined in
Email string `db:"email" json:"email"` // Joined in
CreatedAt time.Time `db:"created_at" json:"createdAt"`
}
// Invite ...
type Invite struct {
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
ID string `db:"id" json:"id"`
Email string `db:"email" json:"email"`
Level string `db:"level" json:"level"`
Code string `db:"code" json:"code"`
CreatedBy string `db:"created_by" json:"createdBy"`
CreatedByName string `db:"created_by_name" json:"createdByName"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
CreatedByEmail string `db:"created_by_email" json:"createdByEmail"`
WorkspaceName string `db:"workspace_name" json:"workspaceName"`
}
// Project ...
type Project struct {
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
ID string `db:"id" json:"id"`
Title string `db:"title" json:"title"`
Description string `db:"description" json:"description"`
CreatedByName string `db:"created_by_name" json:"createdByName"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
LastModified time.Time `db:"last_modified" json:"lastModified"`
LastModifiedByName string `db:"last_modified_by_name" json:"lastModifiedByName"`
ExternalLink string `db:"external_link" json:"externalLink"`
Annotations string `db:"annotations" json:"annotations"`
}
// Milestone ...
type Milestone struct {
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
ProjectID string `db:"project_id" json:"projectId"`
ID string `db:"id" json:"id"`
Title string `db:"title" json:"title"`
Description string `db:"description" json:"description"`
Status string `db:"status" json:"status"`
Rank string `db:"rank" json:"rank"`
CreatedByName string `db:"created_by_name" json:"createdByName"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
LastModified time.Time `db:"last_modified" json:"lastModified"`
LastModifiedByName string `db:"last_modified_by_name" json:"lastModifiedByName"`
Color string `db:"color" json:"color"`
Annotations string `db:"annotations" json:"annotations"`
}
// Workflow ...
type Workflow struct {
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
ProjectID string `db:"project_id" json:"projectId"`
ID string `db:"id" json:"id"`
Title string `db:"title" json:"title"`
Description string `db:"description" json:"description"`
Rank string `db:"rank" json:"rank"`
CreatedByName string `db:"created_by_name" json:"createdByName"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
LastModified time.Time `db:"last_modified" json:"lastModified"`
LastModifiedByName string `db:"last_modified_by_name" json:"lastModifiedByName"`
Color string `db:"color" json:"color"`
Status string `db:"status" json:"status"`
Annotations string `db:"annotations" json:"annotations"`
}
// SubWorkflow ...
type SubWorkflow struct {
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
WorkflowID string `db:"workflow_id" json:"workflowId"`
ID string `db:"id" json:"id"`
Title string `db:"title" json:"title"`
Description string `db:"description" json:"description"`
Rank string `db:"rank" json:"rank"`
CreatedByName string `db:"created_by_name" json:"createdByName"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
LastModified time.Time `db:"last_modified" json:"lastModified"`
LastModifiedByName string `db:"last_modified_by_name" json:"lastModifiedByName"`
Color string `db:"color" json:"color"`
Status string `db:"status" json:"status"`
Annotations string `db:"annotations" json:"annotations"`
}
// Feature ...
type Feature struct {
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
SubWorkflowID string `db:"subworkflow_id" json:"subWorkflowId"`
MilestoneID string `db:"milestone_id" json:"milestoneId"`
ID string `db:"id" json:"id"`
Title string `db:"title" json:"title"`
Rank string `db:"rank" json:"rank"`
Description string `db:"description" json:"description"`
Status string `db:"status" json:"status"`
CreatedByName string `db:"created_by_name" json:"createdByName"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
LastModified time.Time `db:"last_modified" json:"lastModified"`
LastModifiedByName string `db:"last_modified_by_name" json:"lastModifiedByName"`
Color string `db:"color" json:"color"`
Annotations string `db:"annotations" json:"annotations"`
Estimate int `db:"estimate" json:"estimate"`
}
// FeatureComment ...
type FeatureComment struct {
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
ID string `db:"id" json:"id"`
FeatureID string `db:"feature_id" json:"featureId"`
ProjectID string `db:"project_id" json:"projectId"`
Post string `db:"post" json:"post"`
CreatedByName string `db:"created_by_name" json:"createdByName"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
LastModified time.Time `db:"last_modified" json:"lastModified"`
MemberID string `db:"-" json:"memberId"`
}
// FeatureCommentOwner ...
type FeatureCommentOwner struct {
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
ID string `db:"id" json:"id"`
FeatureCommentID string `db:"feature_comment_id" json:"featureCommentId"`
MemberID string `db:"member_id" json:"memberId"`
ProjectID string `db:"project_id" json:"projectId"`
}
// Persona ...
type Persona struct {
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
ProjectID string `db:"project_id" json:"projectId"`
ID string `db:"id" json:"id"`
Name string `db:"name" json:"name"`
Role string `db:"role" json:"role"`
Avatar string `db:"avatar" json:"avatar"`
Description string `db:"description" json:"description"`
CreatedAt time.Time `db:"created_at" json:"createdAt"`
}
// WorkflowPersona ...
type WorkflowPersona struct {
WorkspaceID string `db:"workspace_id" json:"workspaceId"`
ProjectID string `db:"project_id" json:"projectId"`
WorkflowID string `db:"workflow_id" json:"workflowId"`
ID string `db:"id" json:"id"`
PersonaID string `db:"persona_id" json:"personaId"`
}