add comment repository for postgres.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-03-27 13:56:51 +01:00
parent 21b7b44159
commit e4761ad4a0
11 changed files with 264 additions and 43 deletions
+18
View File
@@ -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() {