This commit is contained in:
@@ -16,6 +16,24 @@ type Comment struct {
|
||||
Source string `bson:"source"`
|
||||
}
|
||||
|
||||
func (comment *Comment) ApplyUpdate(update CommentUpdate) {
|
||||
if update.Source != nil {
|
||||
comment.Source = *update.Source
|
||||
}
|
||||
if update.CharacterName != nil {
|
||||
comment.CharacterName = *update.CharacterName
|
||||
}
|
||||
if update.CharacterID != nil {
|
||||
comment.CharacterID = *update.CharacterID
|
||||
}
|
||||
if update.Subject != nil {
|
||||
comment.Subject = *update.Subject
|
||||
}
|
||||
if update.FictionalDate != nil {
|
||||
comment.FictionalDate = *update.FictionalDate
|
||||
}
|
||||
}
|
||||
|
||||
// IsChangeObject is an interface implementation to identify it as a valid
|
||||
// ChangeObject in GQL.
|
||||
func (*Comment) IsChangeObject() {
|
||||
|
||||
Reference in New Issue
Block a user