-
Notifications
You must be signed in to change notification settings - Fork 2
/
model.go
41 lines (36 loc) · 1.26 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
package push
// Message ... プッシュ通知メッセージ
type Message struct {
Title string `json:"title"`
Body string `json:"body"`
Data map[string]string `json:"data"`
IOS *MessageIOS `json:"ios"`
Android *MessageAndroid `json:"android"`
Web *MessageWeb `json:"web"`
}
// MessageIOS ... プッシュ通知メッセージ(iOS独自部分)
type MessageIOS struct {
Sound string `json:"sound,omitempty"`
Badge int `json:"badge,omitempty"`
}
// MessageAndroid ... プッシュ通知メッセージ(Android独自部分)
type MessageAndroid struct {
ClickAction string `json:"click_action,omitempty"`
Sound string `json:"sound,omitempty"`
Tag string `json:"badge,omitempty"`
}
// MessageWeb ... プッシュ通知メッセージ(Web独自部分)
type MessageWeb struct {
Icon string `json:"icon,omitempty"`
}
// Reserve ... 予約
type Reserve struct {
ID string `json:"id"`
UserIDs []string `json:"user_ids"`
Message *Message `json:"message"`
ReservedAt int64 `json:"reserved_at"`
Status ReserveStatus `json:"status"`
Unmanaged bool `json:"unmanaged"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}