add channel table.

This commit is contained in:
2021-03-22 19:34:31 +01:00
parent c5ea598ea1
commit 0bc86ced98
8 changed files with 335 additions and 1 deletions
+15
View File
@@ -9,6 +9,21 @@ type Channel struct {
LocationName string `bson:"locationName,omitempty"`
}
func (channel *Channel) ApplyUpdate(update ChannelUpdate) {
if update.Logged != nil {
channel.Logged = *update.Logged
}
if update.Hub != nil {
channel.Hub = *update.Hub
}
if update.EventName != nil {
channel.EventName = *update.EventName
}
if update.LocationName != nil {
channel.LocationName = *update.LocationName
}
}
// IsChangeObject is an interface implementation to identify it as a valid
// ChangeObject in GQL.
func (*Channel) IsChangeObject() {