From db799da3d2b2ea465165df78ff71effa653b6309 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 28 Dec 2017 11:45:10 +0100 Subject: Add get old comment on follow tests --- server/models/video/video-comment.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server/models') diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index 1992c2dd8..d381ccafa 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts @@ -103,8 +103,10 @@ export class VideoCommentModel extends Model { @BelongsTo(() => VideoCommentModel, { foreignKey: { + name: 'originCommentId', allowNull: true }, + as: 'OriginVideoComment', onDelete: 'CASCADE' }) OriginVideoComment: VideoCommentModel @@ -115,6 +117,7 @@ export class VideoCommentModel extends Model { @BelongsTo(() => VideoCommentModel, { foreignKey: { + name: 'inReplyToCommentId', allowNull: true }, as: 'InReplyToVideoComment', -- cgit v1.2.3