aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-07 14:34:16 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-10 14:02:41 +0200
commit4f32032fed8587ea97d45e235b167e8958efd81f (patch)
tree6ec4ce2d5d05a275fb7eeaf3aee33c2b69ebc043 /shared/models
parent57f6896f67cfc570cf3605dd94b0778101b2d9b9 (diff)
downloadPeerTube-4f32032fed8587ea97d45e235b167e8958efd81f.tar.gz
PeerTube-4f32032fed8587ea97d45e235b167e8958efd81f.tar.zst
PeerTube-4f32032fed8587ea97d45e235b167e8958efd81f.zip
Add migrations
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/moderation/abuse/abuse.model.ts25
-rw-r--r--shared/models/users/user-notification-setting.model.ts2
-rw-r--r--shared/models/users/user.model.ts9
3 files changed, 25 insertions, 11 deletions
diff --git a/shared/models/moderation/abuse/abuse.model.ts b/shared/models/moderation/abuse/abuse.model.ts
index a120803e6..086911ad5 100644
--- a/shared/models/moderation/abuse/abuse.model.ts
+++ b/shared/models/moderation/abuse/abuse.model.ts
@@ -18,6 +18,9 @@ export interface VideoAbuse {
18 18
19 thumbnailPath?: string 19 thumbnailPath?: string
20 channel?: VideoChannel 20 channel?: VideoChannel
21
22 countReports: number
23 nthReport: number
21} 24}
22 25
23export interface VideoCommentAbuse { 26export interface VideoCommentAbuse {
@@ -36,9 +39,12 @@ export interface VideoCommentAbuse {
36 39
37export interface Abuse { 40export interface Abuse {
38 id: number 41 id: number
42
39 reason: string 43 reason: string
40 predefinedReasons?: AbusePredefinedReasonsString[] 44 predefinedReasons?: AbusePredefinedReasonsString[]
45
41 reporterAccount: Account 46 reporterAccount: Account
47 flaggedAccount: Account
42 48
43 state: VideoConstant<AbuseState> 49 state: VideoConstant<AbuseState>
44 moderationComment?: string 50 moderationComment?: string
@@ -49,13 +55,18 @@ export interface Abuse {
49 createdAt: Date 55 createdAt: Date
50 updatedAt: Date 56 updatedAt: Date
51 57
52 // FIXME: deprecated in 2.3, remove this
53 startAt: null
54 endAt: null
55
56 count?: number
57 nth?: number
58
59 countReportsForReporter?: number 58 countReportsForReporter?: number
60 countReportsForReportee?: 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
61} 72}
diff --git a/shared/models/users/user-notification-setting.model.ts b/shared/models/users/user-notification-setting.model.ts
index 451f40d58..4e2230a76 100644
--- a/shared/models/users/user-notification-setting.model.ts
+++ b/shared/models/users/user-notification-setting.model.ts
@@ -7,7 +7,7 @@ export enum UserNotificationSettingValue {
7export interface UserNotificationSetting { 7export interface UserNotificationSetting {
8 newVideoFromSubscription: UserNotificationSettingValue 8 newVideoFromSubscription: UserNotificationSettingValue
9 newCommentOnMyVideo: UserNotificationSettingValue 9 newCommentOnMyVideo: UserNotificationSettingValue
10 videoAbuseAsModerator: UserNotificationSettingValue 10 abuseAsModerator: UserNotificationSettingValue
11 videoAutoBlacklistAsModerator: UserNotificationSettingValue 11 videoAutoBlacklistAsModerator: UserNotificationSettingValue
12 blacklistOnMyVideo: UserNotificationSettingValue 12 blacklistOnMyVideo: UserNotificationSettingValue
13 myVideoPublished: UserNotificationSettingValue 13 myVideoPublished: UserNotificationSettingValue
diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts
index 6c959ceea..859736b2f 100644
--- a/shared/models/users/user.model.ts
+++ b/shared/models/users/user.model.ts
@@ -31,10 +31,13 @@ export interface User {
31 videoQuotaDaily: number 31 videoQuotaDaily: number
32 videoQuotaUsed?: number 32 videoQuotaUsed?: number
33 videoQuotaUsedDaily?: number 33 videoQuotaUsedDaily?: number
34
34 videosCount?: number 35 videosCount?: number
35 videoAbusesCount?: number 36
36 videoAbusesAcceptedCount?: number 37 abusesCount?: number
37 videoAbusesCreatedCount?: number 38 abusesAcceptedCount?: number
39 abusesCreatedCount?: number
40
38 videoCommentsCount? : number 41 videoCommentsCount? : number
39 42
40 theme: string 43 theme: string