]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/moderation/abuse/abuse.model.ts
Use 3 tables to represent 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 deleted: boolean
13 blacklisted: boolean
14
15 startAt: number | null
16 endAt: number | null
17
18 thumbnailPath?: string
19 channel?: VideoChannel
20 }
21
22 export interface VideoCommentAbuse {
23 id: number
24 account?: Account
25 text: string
26 deleted: boolean
27 }
28
29 export interface Abuse {
30 id: number
31 reason: string
32 predefinedReasons?: AbusePredefinedReasonsString[]
33 reporterAccount: Account
34
35 state: VideoConstant<AbuseState>
36 moderationComment?: string
37
38 video?: VideoAbuse
39 comment?: VideoCommentAbuse
40
41 createdAt: Date
42 updatedAt: Date
43
44 // FIXME: deprecated in 2.3, remove this
45 startAt: null
46 endAt: null
47
48 count?: number
49 nth?: number
50
51 countReportsForReporter?: number
52 countReportsForReportee?: number
53 }