From 615aa4e96367da8f715f3d55574a39351debbe94 Mon Sep 17 00:00:00 2001 From: Sinh Date: Mon, 21 Nov 2022 15:33:31 +0700 Subject: [PATCH] update version --- const.go | 7 +++++++ model.go | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 const.go diff --git a/const.go b/const.go new file mode 100644 index 0000000..81e597a --- /dev/null +++ b/const.go @@ -0,0 +1,7 @@ +package notification + +const ( + SortOrderDesc = "-order" + SortOrderAsc = "order" + SortDefault = "-lastPushAt" +) diff --git a/model.go b/model.go index c31e912..1db232f 100644 --- a/model.go +++ b/model.go @@ -17,7 +17,8 @@ type PushRequest struct { Label string `json:"label,omitempty"` Category string `json:"category,omitempty"` Sound *Sound `json:"sound,omitempty"` - Link string `json:"link"` // for webpush + Link string `json:"link"` // for webpush + Order int `json:"order"` // for sort } // Sound ... @@ -45,6 +46,7 @@ type Query struct { Status string `json:"status"` Page int64 `json:"page,omitempty"` Limit int64 `json:"limit,omitempty"` + Sort string `json:"sort,omitempty"` // SortDefault, SortOrderDesc, SortOrderAsc } type query struct {