-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
96 lines (84 loc) · 3.05 KB
/
models.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
package main
import (
"time"
)
type Person struct {
Id string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt *time.Time `json:"deletedAt"`
ExternalId string `json:"externalId"`
Name string `json:"name"`
Email string `json:"email"`
}
type Tenant struct {
Id string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt *time.Time `json:"deletedAt"`
CreatorId string `json:"creatorId"`
Name string `json:"name"`
Title string `json:"title"`
Domain string `json:"domain"`
Creator *Person `json:"creator,omitempty" sql:"-"`
Memberships []Membership `json:"memberships"`
}
type Client struct {
Id string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt *time.Time `json:"deletedAt"`
CreatorId string `json:"creatorId"`
TenantId string `json:"tenantId"`
Name string `json:"name"`
Creator *Person `json:"creator,omitempty" sql:"-"`
Tenant *Tenant `json:"tenant,omitempty" sql:"-"`
Projects []Project `json:"projects"`
Memberships []Membership `json:"memberships"`
}
type Project struct {
Id string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt *time.Time `json:"deletedAt"`
CreatorId string `json:"creatorId"`
ClientId string `json:"clientId"`
Name string `json:"name"`
Creator *Person `json:"creator,omitempty" sql:"-"`
Client *Client `json:"client,omitempty" sql:"-"`
Memberships []Membership `json:"memberships"`
}
type Review struct {
Id string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt *time.Time `json:"deletedAt"`
CreatorId string `json:"creatorId"`
ProjectId string `json:"projectId"`
Name string `json:"name"`
Message string `json:"message"`
Status string `json:"status"`
ExpiresAt *time.Time `json:"expiresAt"`
Creator *Person `json:"creator,omitempty" sql:"-"`
Project *Project `json:"project,omitempty" sql:"-"`
Memberships []Membership `json:"memberships"`
}
type Membership struct {
Id string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt *time.Time `json:"deletedAt"`
CreatorId string `json:"creatorId"`
PersonId *string `json:"personId"`
Type string `json:"type"`
TenantId *string `json:"tenantId"`
ClientId *string `json:"clientId"`
ProjectId *string `json:"projectId"`
ReviewId *string `json:"reviewId"`
Creator *Person `json:"creator,omitempty" sql:"-"`
Person *Person `json:"person,omitempty" sql:"-"`
Tenant *Tenant `json:"tenant,omitempty" sql:"-"`
Client *Client `json:"client,omitempty" sql:"-"`
Project *Project `json:"project,omitempty" sql:"-"`
Review *Review `json:"review,omitempty" sql:"-"`
}