aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/abuse/video-comment-abuse.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/abuse/video-comment-abuse.ts')
-rw-r--r--server/models/abuse/video-comment-abuse.ts48
1 files changed, 0 insertions, 48 deletions
diff --git a/server/models/abuse/video-comment-abuse.ts b/server/models/abuse/video-comment-abuse.ts
deleted file mode 100644
index 337aaaa58..000000000
--- a/server/models/abuse/video-comment-abuse.ts
+++ /dev/null
@@ -1,48 +0,0 @@
1import { BelongsTo, Column, CreatedAt, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
2import { AttributesOnly } from '@shared/typescript-utils'
3import { VideoCommentModel } from '../video/video-comment'
4import { AbuseModel } from './abuse'
5
6@Table({
7 tableName: 'commentAbuse',
8 indexes: [
9 {
10 fields: [ 'abuseId' ]
11 },
12 {
13 fields: [ 'videoCommentId' ]
14 }
15 ]
16})
17export class VideoCommentAbuseModel extends Model<Partial<AttributesOnly<VideoCommentAbuseModel>>> {
18
19 @CreatedAt
20 createdAt: Date
21
22 @UpdatedAt
23 updatedAt: Date
24
25 @ForeignKey(() => AbuseModel)
26 @Column
27 abuseId: number
28
29 @BelongsTo(() => AbuseModel, {
30 foreignKey: {
31 allowNull: false
32 },
33 onDelete: 'cascade'
34 })
35 Abuse: AbuseModel
36
37 @ForeignKey(() => VideoCommentModel)
38 @Column
39 videoCommentId: number
40
41 @BelongsTo(() => VideoCommentModel, {
42 foreignKey: {
43 allowNull: true
44 },
45 onDelete: 'set null'
46 })
47 VideoComment: VideoCommentModel
48}