SimpleCloudNotifier/scnserver/models/subscription.go

19 lines
938 B
Go
Raw Normal View History

2022-11-19 15:13:47 +01:00
package models
2023-04-21 21:45:16 +02:00
// [!] subscriptions are read-access to channels,
//
// The set of subscriptions specifies which messages the ListMessages() API call returns
// also single messages/channels that are subscribed can be queries
//
// (use keytokens for write-access)
2022-11-19 15:13:47 +01:00
type Subscription struct {
SubscriptionID SubscriptionID `db:"subscription_id" json:"subscription_id"`
SubscriberUserID UserID `db:"subscriber_user_id" json:"subscriber_user_id"`
ChannelOwnerUserID UserID `db:"channel_owner_user_id" json:"channel_owner_user_id"`
ChannelID ChannelID `db:"channel_id" json:"channel_id"`
ChannelInternalName string `db:"channel_internal_name" json:"channel_internal_name"`
TimestampCreated SCNTime `db:"timestamp_created" json:"timestamp_created"`
Confirmed bool `db:"confirmed" json:"confirmed"`
2022-11-19 15:13:47 +01:00
}