diff --git a/models/conversations/comment.go b/models/conversations/comment.go index e458803e4a16..72edf6a43257 100644 --- a/models/conversations/comment.go +++ b/models/conversations/comment.go @@ -124,8 +124,8 @@ type ConversationComment struct { Content string `xorm:"LONGTEXT"` ContentVersion int `xorm:"NOT NULL DEFAULT 0"` - ConversationID int64 `xorm:"INDEX"` - Conversation *Conversation + ConversationID int64 `xorm:"INDEX"` + Conversation *Conversation `xorm:"-"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` diff --git a/models/conversations/conversation.go b/models/conversations/conversation.go index cff9cdf13aab..1414b35d4d1c 100644 --- a/models/conversations/conversation.go +++ b/models/conversations/conversation.go @@ -94,6 +94,9 @@ var ErrConversationAlreadyChanged = util.NewInvalidArgumentErrorf("the conversat type ConversationType int +// CommentTypeUndefined is used to search for comments of any type +const ConversationTypeUndefined CommentType = -1 + const ( ConversationTypeCommit ConversationType = iota )