+ countMessages,
+
+ createdAt: this.createdAt,
+ updatedAt: this.updatedAt
+ }
+ }
+
+ toFormattedAdminJSON (this: MAbuseAdminFormattable): AdminAbuse {
+ const countReportsForVideo = this.get('countReportsForVideo') as number
+ const nthReportForVideo = this.get('nthReportForVideo') as number
+
+ const countReportsForReporter = this.get('countReportsForReporter') as number
+ const countReportsForReportee = this.get('countReportsForReportee') as number
+
+ const countMessages = this.get('countMessages') as number
+
+ const baseVideo = this.buildBaseVideoAbuse()
+ const video: AdminVideoAbuse = baseVideo
+ ? Object.assign(baseVideo, {
+ countReports: countReportsForVideo,
+ nthReport: nthReportForVideo
+ })
+ : null
+
+ const comment: AdminVideoCommentAbuse = this.buildBaseVideoCommentAbuse()
+
+ const abuse = this.buildBaseAbuse(countMessages || 0)