forked from amborle/featmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
144 lines (133 loc) · 6.86 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
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"`
}
// 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:"status"`
}
// 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"`
}
// 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"`
}
// 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"`
}
// 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"`
}
// 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"`
}