]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/moderation/abuse/abuse.model.ts
Add new abuses tests
[github/Chocobozzz/PeerTube.git] / shared / models / moderation / abuse / abuse.model.ts
CommitLineData
d95d1559
C
1import { Account } from '../../actors/account.model'
2import { AbuseState } from './abuse-state.model'
3import { AbusePredefinedReasonsString } from './abuse-reason.model'
4import { VideoConstant } from '../../videos/video-constant.model'
5import { VideoChannel } from '../../videos/channel/video-channel.model'
6
7export interface VideoAbuse {
8 id: number
9 name: string
10 uuid: string
11 nsfw: boolean
57f6896f 12
d95d1559
C
13 deleted: boolean
14 blacklisted: boolean
15
16 startAt: number | null
17 endAt: number | null
18
19 thumbnailPath?: string
20 channel?: VideoChannel
4f32032f
C
21
22 countReports: number
23 nthReport: number
d95d1559
C
24}
25
26export interface VideoCommentAbuse {
27 id: number
57f6896f
C
28
29 video: {
30 id: number
31 name: string
32 uuid: string
33 }
34
d95d1559 35 text: string
57f6896f 36
d95d1559
C
37 deleted: boolean
38}
39
40export interface Abuse {
41 id: number
4f32032f 42
d95d1559
C
43 reason: string
44 predefinedReasons?: AbusePredefinedReasonsString[]
4f32032f 45
d95d1559 46 reporterAccount: Account
4f32032f 47 flaggedAccount: Account
d95d1559
C
48
49 state: VideoConstant<AbuseState>
50 moderationComment?: string
51
52 video?: VideoAbuse
53 comment?: VideoCommentAbuse
54
55 createdAt: Date
56 updatedAt: Date
57
d95d1559
C
58 countReportsForReporter?: number
59 countReportsForReportee?: number
4f32032f
C
60
61 // FIXME: deprecated in 2.3, remove the following properties
62
811cef14
C
63 // @deprecated
64 startAt: null
65 // @deprecated
66 endAt: null
67
68 // @deprecated
69 count?: number
70 // @deprecated
71 nth?: number
d95d1559 72}