From 74fe5f57e3f550b4b008b24b9190bb2da00c8bd8 Mon Sep 17 00:00:00 2001 From: soukainna Date: Wed, 22 Feb 2023 14:56:51 +0100 Subject: [PATCH] add deleteSub in event struct --- storage/events.go | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/storage/events.go b/storage/events.go index e71aeb0..e16c0b3 100644 --- a/storage/events.go +++ b/storage/events.go @@ -3,22 +3,23 @@ package storage import "time" type Event struct { - ID string `json:"id" bson:"_id"` - Namespace string `json:"namespace"` - Owners []string `json:"owners"` - RestrictedTo []string `json:"restricted_to"` - Type string `json:"type"` - Name string `json:"name"` - Description string `json:"description"` - Startdate time.Time `json:"startdate"` - Enddate time.Time `json:"enddate"` - Starttime string `json:"starttime"` - Endtime string `json:"endtime"` - Allday bool `json:"allday"` - MaxSubscribers int64 `json:"max_subscribers"` - Subscriptions []Subscription `json:"subscriptions" bson:"subscriptions,omitempty"` - Data map[string]any `json:"data"` - Deleted bool `json:"deleted"` + ID string `json:"id" bson:"_id"` + Namespace string `json:"namespace"` + Owners []string `json:"owners"` + RestrictedTo []string `json:"restricted_to"` + Type string `json:"type"` + Name string `json:"name"` + Description string `json:"description"` + Startdate time.Time `json:"startdate"` + Enddate time.Time `json:"enddate"` + Starttime string `json:"starttime"` + Endtime string `json:"endtime"` + Allday bool `json:"allday"` + MaxSubscribers int64 `json:"max_subscribers"` + Subscriptions []Subscription `json:"subscriptions" bson:"subscriptions,omitempty"` + DeletedSubscription []Subscription `json:"deletedsubscriptions" bson:"deletedsubscriptions,omitempty"` + Data map[string]any `json:"data"` + Deleted bool `json:"deleted"` } type Subscription struct {