-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.go
82 lines (59 loc) · 1.46 KB
/
user.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
package models
import "time"
type User struct {
// avi img Uri
AviImgURI *string `json:"aviImgUri,omitempty"`
// commented
Posted []ContentNode `json:"~author,omitempty"`
// email
// Required: true
Email string `json:"email,omitempty"`
// invited by
InvitedBy []*User `json:"invitedBy,omitempty"`
// joined
// Required: true
Joined *time.Time `json:"joined,omitempty"`
// name
// Required: true
Name string `json:"name,omitempty"`
// reputation
// Required: true
Reputation float64 `json:"reputation,omitempty"`
// role
// Required: true
Role []*Role `json:"role,omitempty"`
// spent
Spent float64 `json:"spent,omitempty"`
// uid
UID *string `json:"uid,omitempty"`
// type
DgraphType []string `json:"dgraph.type,omitempty"`
}
// // NewContentNodeNode is a struct designed to handle special parameters for creating a node in DGraph
// type NewUserNode struct {
// User
// InvitedByUID *Edge `json:"invitedBy,omitempty"`
// Role *Edge `json:"role,omitempty"`
// }
// Role role
type Role struct {
// text
// Required: true
Text string `json:"text,omitempty"`
// uid
UID *string `json:"uid,omitempty"`
// type
DgraphType []string `json:"dgraph.type,omitempty"`
}
// Invite invite
// swagger:model Invite
type Invite struct {
// code
Code string `json:"code,omitempty"`
// created by
CreatedBy *User `json:"createdBy,omitempty"`
// uid
UID *string `json:"uid,omitempty"`
// type
DgraphType []string `json:"dgraph.type,omitempty"`
}