import { VideoConstant } from '../../videos/video-constant.model'
import { VideoChannel } from '../../videos/channel/video-channel.model'
-export interface VideoAbuse {
+export interface AdminVideoAbuse {
id: number
name: string
uuid: string
thumbnailPath?: string
channel?: VideoChannel
+
+ countReports: number
+ nthReport: number
}
-export interface VideoCommentAbuse {
+export interface AdminVideoCommentAbuse {
id: number
+ threadId: number
video: {
id: number
deleted: boolean
}
-export interface Abuse {
+export interface AdminAbuse {
id: number
+
reason: string
predefinedReasons?: AbusePredefinedReasonsString[]
+
reporterAccount: Account
+ flaggedAccount: Account
state: VideoConstant<AbuseState>
moderationComment?: string
- video?: VideoAbuse
- comment?: VideoCommentAbuse
+ video?: AdminVideoAbuse
+ comment?: AdminVideoCommentAbuse
createdAt: Date
updatedAt: Date
- // FIXME: deprecated in 2.3, remove this
- startAt: null
- endAt: null
-
- count?: number
- nth?: number
-
countReportsForReporter?: number
countReportsForReportee?: number
+
+ countMessages: number
}
+
+export type UserVideoAbuse = Omit<AdminVideoAbuse, 'countReports' | 'nthReport'>
+
+export type UserVideoCommentAbuse = AdminVideoCommentAbuse
+
+export type UserAbuse = Omit<AdminAbuse, 'reporterAccount' | 'countReportsForReportee' | 'countReportsForReporter' | 'startAt' | 'endAt'
+| 'count' | 'nth' | 'moderationComment'>