-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfriend.go
38 lines (31 loc) · 917 Bytes
/
friend.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
package models
import "go.mongodb.org/mongo-driver/bson/primitive"
/*
Friend
- Friend object
*/
type Friend struct {
ID primitive.ObjectID `json:"id" bson:"_id"`
UUID string `json:"uuid" bson:"uuid"`
CreatedAt int64 `json:"created_at" bson:"created_at"`
}
/*
Friend Request
- friend request object
*/
type FriendRequest struct {
ID primitive.ObjectID `json:"id,omitempty" bson:"_id"`
Requestor string `json:"requestor" bson:"requestor"`
Requestee string `json:"requestee" bson:"requestee"`
Status string `json:"status" bson:"status"`
CreatedAt int64 `json:"created_at" bson:"created_at"`
}
/*
Friend Requests
- total number of friend request
- friend requests
*/
type FriendRequests struct {
TotalRequests int `json:"total_requests"`
Requests []FriendRequest `json:"requests"`
}