Improve agenda

This commit is contained in:
2022-12-05 17:21:12 +01:00
parent ba8ae85d66
commit 5feb1b720e
8 changed files with 227 additions and 144 deletions

View File

@@ -3,27 +3,28 @@ 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"`
//Subscribers []string `json:"subscribers" bson:"subscribers,omitempty`
Subscriptions []Subscription `json:"subscriptions" bson:"subscriptions,omitempty"`
Data map[string]any `json:"data"`
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"`
}
type Subscription struct {
ID string `json:"id" bson:"_id"`
Subscriber string `json:"subscriber"`
Tags []string `json:"tags"`
CreatedAt time.Time `json:"created_at,omitempty"`
Data map[string]any `json:"data"`
}