diff options
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video-comment.ts | 3 |
1 files changed, 3 insertions, 0 deletions
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<VideoCommentModel> { | |||
103 | 103 | ||
104 | @BelongsTo(() => VideoCommentModel, { | 104 | @BelongsTo(() => VideoCommentModel, { |
105 | foreignKey: { | 105 | foreignKey: { |
106 | name: 'originCommentId', | ||
106 | allowNull: true | 107 | allowNull: true |
107 | }, | 108 | }, |
109 | as: 'OriginVideoComment', | ||
108 | onDelete: 'CASCADE' | 110 | onDelete: 'CASCADE' |
109 | }) | 111 | }) |
110 | OriginVideoComment: VideoCommentModel | 112 | OriginVideoComment: VideoCommentModel |
@@ -115,6 +117,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> { | |||
115 | 117 | ||
116 | @BelongsTo(() => VideoCommentModel, { | 118 | @BelongsTo(() => VideoCommentModel, { |
117 | foreignKey: { | 119 | foreignKey: { |
120 | name: 'inReplyToCommentId', | ||
118 | allowNull: true | 121 | allowNull: true |
119 | }, | 122 | }, |
120 | as: 'InReplyToVideoComment', | 123 | as: 'InReplyToVideoComment', |