1 import { AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
2 import { VideoComment } from '@shared/models'
3 import { VideoCommentModel } from '../video/video-comment'
4 import { AbuseModel } from './abuse'
7 tableName: 'commentAbuse',
13 fields: [ 'videoCommentId' ]
17 export class VideoCommentAbuseModel extends Model<VideoCommentAbuseModel> {
27 @Column(DataType.JSONB)
28 deletedComment: VideoComment & { Video: { name: string, id: number, uuid: string }}
30 @ForeignKey(() => AbuseModel)
34 @BelongsTo(() => AbuseModel, {
42 @ForeignKey(() => VideoCommentModel)
44 videoCommentId: number
46 @BelongsTo(() => VideoCommentModel, {
52 VideoComment: VideoCommentModel