diff options
Diffstat (limited to 'server/models/abuse/video-comment-abuse.ts')
-rw-r--r-- | server/models/abuse/video-comment-abuse.ts | 48 |
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 @@ | |||
1 | import { BelongsTo, Column, CreatedAt, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' | ||
2 | import { AttributesOnly } from '@shared/typescript-utils' | ||
3 | import { VideoCommentModel } from '../video/video-comment' | ||
4 | import { AbuseModel } from './abuse' | ||
5 | |||
6 | @Table({ | ||
7 | tableName: 'commentAbuse', | ||
8 | indexes: [ | ||
9 | { | ||
10 | fields: [ 'abuseId' ] | ||
11 | }, | ||
12 | { | ||
13 | fields: [ 'videoCommentId' ] | ||
14 | } | ||
15 | ] | ||
16 | }) | ||
17 | export 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 | } | ||