add channel table.
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user