diff options
Diffstat (limited to 'shared/models/videos')
-rw-r--r-- | shared/models/videos/index.ts | 10 | ||||
-rw-r--r-- | shared/models/videos/user-video-rate-update.model.ts | 5 | ||||
-rw-r--r-- | shared/models/videos/user-video-rate.model.ts | 6 | ||||
-rw-r--r-- | shared/models/videos/user-video-rate.type.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/video-abuse-create.model.ts | 3 | ||||
-rw-r--r-- | shared/models/videos/video-abuse.model.ts | 8 | ||||
-rw-r--r-- | shared/models/videos/video-blacklist.model.ts | 5 | ||||
-rw-r--r-- | shared/models/videos/video-create.model.ts | 9 | ||||
-rw-r--r-- | shared/models/videos/video-rate.type.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/video-update.model.ts | 9 | ||||
-rw-r--r-- | shared/models/videos/video.model.ts | 23 |
11 files changed, 80 insertions, 0 deletions
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts new file mode 100644 index 000000000..64d1676c5 --- /dev/null +++ b/shared/models/videos/index.ts | |||
@@ -0,0 +1,10 @@ | |||
1 | export * from './user-video-rate-update.model' | ||
2 | export * from './user-video-rate.model' | ||
3 | export * from './user-video-rate.type' | ||
4 | export * from './video-abuse-create.model' | ||
5 | export * from './video-abuse.model' | ||
6 | export * from './video-blacklist.model' | ||
7 | export * from './video-create.model' | ||
8 | export * from './video-rate.type' | ||
9 | export * from './video-update.model' | ||
10 | export * from './video.model' | ||
diff --git a/shared/models/videos/user-video-rate-update.model.ts b/shared/models/videos/user-video-rate-update.model.ts new file mode 100644 index 000000000..85e89271a --- /dev/null +++ b/shared/models/videos/user-video-rate-update.model.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | import { UserVideoRateType } from './user-video-rate.type' | ||
2 | |||
3 | export interface UserVideoRateUpdate { | ||
4 | rating: UserVideoRateType | ||
5 | } | ||
diff --git a/shared/models/videos/user-video-rate.model.ts b/shared/models/videos/user-video-rate.model.ts new file mode 100644 index 000000000..4b9c574d8 --- /dev/null +++ b/shared/models/videos/user-video-rate.model.ts | |||
@@ -0,0 +1,6 @@ | |||
1 | import { UserVideoRateType } from './user-video-rate.type' | ||
2 | |||
3 | export interface UserVideoRate { | ||
4 | videoId: string | ||
5 | rating: UserVideoRateType | ||
6 | } | ||
diff --git a/shared/models/videos/user-video-rate.type.ts b/shared/models/videos/user-video-rate.type.ts new file mode 100644 index 000000000..a4d9c7e39 --- /dev/null +++ b/shared/models/videos/user-video-rate.type.ts | |||
@@ -0,0 +1 @@ | |||
export type UserVideoRateType = 'like' | 'dislike' | 'none' | |||
diff --git a/shared/models/videos/video-abuse-create.model.ts b/shared/models/videos/video-abuse-create.model.ts new file mode 100644 index 000000000..db6458275 --- /dev/null +++ b/shared/models/videos/video-abuse-create.model.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | export interface VideoAbuseCreate { | ||
2 | reason: string | ||
3 | } | ||
diff --git a/shared/models/videos/video-abuse.model.ts b/shared/models/videos/video-abuse.model.ts new file mode 100644 index 000000000..72e32cbc7 --- /dev/null +++ b/shared/models/videos/video-abuse.model.ts | |||
@@ -0,0 +1,8 @@ | |||
1 | export interface VideoAbuse { | ||
2 | id: number | ||
3 | reporterPodHost: string | ||
4 | reason: string | ||
5 | reporterUsername: string | ||
6 | videoId: string | ||
7 | createdAt: Date | ||
8 | } | ||
diff --git a/shared/models/videos/video-blacklist.model.ts b/shared/models/videos/video-blacklist.model.ts new file mode 100644 index 000000000..f894bb065 --- /dev/null +++ b/shared/models/videos/video-blacklist.model.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export interface BlacklistedVideo { | ||
2 | id: number | ||
3 | videoId: string | ||
4 | createdAt: Date | ||
5 | } | ||
diff --git a/shared/models/videos/video-create.model.ts b/shared/models/videos/video-create.model.ts new file mode 100644 index 000000000..5c0b498ce --- /dev/null +++ b/shared/models/videos/video-create.model.ts | |||
@@ -0,0 +1,9 @@ | |||
1 | export interface VideoCreate { | ||
2 | category: number | ||
3 | licence: number | ||
4 | language: number | ||
5 | description: string | ||
6 | nsfw: boolean | ||
7 | name: string | ||
8 | tags: string[] | ||
9 | } | ||
diff --git a/shared/models/videos/video-rate.type.ts b/shared/models/videos/video-rate.type.ts new file mode 100644 index 000000000..d48774a4b --- /dev/null +++ b/shared/models/videos/video-rate.type.ts | |||
@@ -0,0 +1 @@ | |||
export type VideoRateType = 'like' | 'dislike' | |||
diff --git a/shared/models/videos/video-update.model.ts b/shared/models/videos/video-update.model.ts new file mode 100644 index 000000000..29a82621b --- /dev/null +++ b/shared/models/videos/video-update.model.ts | |||
@@ -0,0 +1,9 @@ | |||
1 | export interface VideoUpdate { | ||
2 | name?: string | ||
3 | category?: number | ||
4 | licence?: number | ||
5 | language?: number | ||
6 | description?: string | ||
7 | tags?: string[] | ||
8 | nsfw?: boolean | ||
9 | } | ||
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts new file mode 100644 index 000000000..2e35f005c --- /dev/null +++ b/shared/models/videos/video.model.ts | |||
@@ -0,0 +1,23 @@ | |||
1 | export interface Video { | ||
2 | id: string | ||
3 | author: string | ||
4 | createdAt: Date | ||
5 | categoryLabel: string | ||
6 | category: number | ||
7 | licenceLabel: string | ||
8 | licence: number | ||
9 | languageLabel: string | ||
10 | language: number | ||
11 | description: string | ||
12 | duration: number | ||
13 | isLocal: boolean | ||
14 | magnetUri: string | ||
15 | name: string | ||
16 | podHost: string | ||
17 | tags: string[] | ||
18 | thumbnailPath: string | ||
19 | views: number | ||
20 | likes: number | ||
21 | dislikes: number | ||
22 | nsfw: boolean | ||
23 | } | ||