-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
51 lines (44 loc) · 1.37 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
package push_notification
import (
"firebase.google.com/go/messaging"
"time"
)
type DataNotification struct {
UsersID []string `json:"users_id"`
Message *messaging.MulticastMessage `json:"message"`
}
// FirestoreEvent is the payload of a Firestore event.
type FirestoreEvent struct {
OldValue FirestoreValue `json:"oldValue"`
Value FirestoreValue `json:"value"`
UpdateMask struct {
FieldPaths []string `json:"fieldPaths"`
} `json:"updateMask"`
}
// FirestoreValue holds Firestore fields.
type FirestoreValue struct {
CreateTime time.Time `json:"createTime"`
// Fields is the data for this value. The type depends on the format of your
// database. Log an interface{} value and inspect the result to see a JSON
// representation of your database fields.
Fields MyData `json:"fields"`
Name string `json:"name"`
UpdateTime time.Time `json:"updateTime"`
}
type MyData struct {
AvatarFrom tipos `json:"avatarFrom"`
Content tipos `json:"content"`
Image tipos `json:"image"`
IDFrom tipos `json:"idFrom"`
IDTo tipos `json:"idTo"`
NameFrom tipos `json:"nameFrom"`
Type_ tipos `json:"type"`
//Friends
Name tipos `json:"name"`
Photo tipos `json:"photoUrlMin"`
Nickname tipos `json:"nickname"`
}
type tipos struct {
StringValue string `json:"stringValue"`
IntegerValue string `json:"integerValue"`
}