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