aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/moderation/abuse/abuse.model.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-01 16:05:30 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-10 14:02:41 +0200
commitd95d15598847c7f020aa056e7e6e0c02d2bbf732 (patch)
treea8a593f1269688caf9e5f99559996f346290fec5 /shared/models/moderation/abuse/abuse.model.ts
parent72493e44e9b455a04c4f093ed6c6ffa300b98d8b (diff)
downloadPeerTube-d95d15598847c7f020aa056e7e6e0c02d2bbf732.tar.gz
PeerTube-d95d15598847c7f020aa056e7e6e0c02d2bbf732.tar.zst
PeerTube-d95d15598847c7f020aa056e7e6e0c02d2bbf732.zip
Use 3 tables to represent abuses
Diffstat (limited to 'shared/models/moderation/abuse/abuse.model.ts')
-rw-r--r--shared/models/moderation/abuse/abuse.model.ts53
1 files changed, 53 insertions, 0 deletions
diff --git a/shared/models/moderation/abuse/abuse.model.ts b/shared/models/moderation/abuse/abuse.model.ts
new file mode 100644
index 000000000..9ff150c4a
--- /dev/null
+++ b/shared/models/moderation/abuse/abuse.model.ts
@@ -0,0 +1,53 @@
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
12 deleted: boolean
13 blacklisted: boolean
14
15 startAt: number | null
16 endAt: number | null
17
18 thumbnailPath?: string
19 channel?: VideoChannel
20}
21
22export interface VideoCommentAbuse {
23 id: number
24 account?: Account
25 text: string
26 deleted: boolean
27}
28
29export 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}