-import { AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
-import { VideoComment } from '@shared/models'
+import { BelongsTo, Column, CreatedAt, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
+import { AttributesOnly } from '@shared/core-utils'
import { VideoCommentModel } from '../video/video-comment'
import { AbuseModel } from './abuse'
}
]
})
-export class VideoCommentAbuseModel extends Model<VideoCommentAbuseModel> {
+export class VideoCommentAbuseModel extends Model<Partial<AttributesOnly<VideoCommentAbuseModel>>> {
@CreatedAt
createdAt: Date
@UpdatedAt
updatedAt: Date
- @AllowNull(true)
- @Default(null)
- @Column(DataType.JSONB)
- deletedComment: VideoComment
-
@ForeignKey(() => AbuseModel)
@Column
abuseId: number