aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-24 19:41:09 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-26 09:11:38 +0200
commit72c7248b6fdcdb2175e726ff51b42e7555f2bd84 (patch)
tree1bfdee99dbe2392cc997edba8e314e2a8a401c72 /shared/models/videos
parent8113a93a0d9f31aa9e23702bbc31b8a76275ae22 (diff)
downloadPeerTube-72c7248b6fdcdb2175e726ff51b42e7555f2bd84.tar.gz
PeerTube-72c7248b6fdcdb2175e726ff51b42e7555f2bd84.tar.zst
PeerTube-72c7248b6fdcdb2175e726ff51b42e7555f2bd84.zip
Add video channels
Diffstat (limited to 'shared/models/videos')
-rw-r--r--shared/models/videos/index.ts3
-rw-r--r--shared/models/videos/video-channel-create.model.ts4
-rw-r--r--shared/models/videos/video-channel-update.model.ts4
-rw-r--r--shared/models/videos/video-channel.model.ts15
-rw-r--r--shared/models/videos/video-create.model.ts1
-rw-r--r--shared/models/videos/video.model.ts6
6 files changed, 33 insertions, 0 deletions
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts
index 35144dbad..2a3912f06 100644
--- a/shared/models/videos/index.ts
+++ b/shared/models/videos/index.ts
@@ -4,6 +4,9 @@ export * from './user-video-rate.type'
4export * from './video-abuse-create.model' 4export * from './video-abuse-create.model'
5export * from './video-abuse.model' 5export * from './video-abuse.model'
6export * from './video-blacklist.model' 6export * from './video-blacklist.model'
7export * from './video-channel-create.model'
8export * from './video-channel-update.model'
9export * from './video-channel.model'
7export * from './video-create.model' 10export * from './video-create.model'
8export * from './video-rate.type' 11export * from './video-rate.type'
9export * from './video-resolution.enum' 12export * from './video-resolution.enum'
diff --git a/shared/models/videos/video-channel-create.model.ts b/shared/models/videos/video-channel-create.model.ts
new file mode 100644
index 000000000..f309c8f45
--- /dev/null
+++ b/shared/models/videos/video-channel-create.model.ts
@@ -0,0 +1,4 @@
1export interface VideoChannelCreate {
2 name: string
3 description?: string
4}
diff --git a/shared/models/videos/video-channel-update.model.ts b/shared/models/videos/video-channel-update.model.ts
new file mode 100644
index 000000000..4e98e39a8
--- /dev/null
+++ b/shared/models/videos/video-channel-update.model.ts
@@ -0,0 +1,4 @@
1export interface VideoChannelUpdate {
2 name: string
3 description: string
4}
diff --git a/shared/models/videos/video-channel.model.ts b/shared/models/videos/video-channel.model.ts
new file mode 100644
index 000000000..ee56c54b6
--- /dev/null
+++ b/shared/models/videos/video-channel.model.ts
@@ -0,0 +1,15 @@
1import { Video } from './video.model'
2
3export interface VideoChannel {
4 id: number
5 name: string
6 description: string
7 isLocal: boolean
8 createdAt: Date | string
9 updatedAt: Date | string
10 owner?: {
11 name: string
12 uuid: string
13 }
14 videos?: Video[]
15}
diff --git a/shared/models/videos/video-create.model.ts b/shared/models/videos/video-create.model.ts
index 5c0b498ce..4d0e83520 100644
--- a/shared/models/videos/video-create.model.ts
+++ b/shared/models/videos/video-create.model.ts
@@ -3,6 +3,7 @@ export interface VideoCreate {
3 licence: number 3 licence: number
4 language: number 4 language: number
5 description: string 5 description: string
6 channelId: number
6 nsfw: boolean 7 nsfw: boolean
7 name: string 8 name: string
8 tags: string[] 9 tags: string[]
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts
index 8e47ac069..32463933d 100644
--- a/shared/models/videos/video.model.ts
+++ b/shared/models/videos/video.model.ts
@@ -1,3 +1,5 @@
1import { VideoChannel } from './video-channel.model'
2
1export interface VideoFile { 3export interface VideoFile {
2 magnetUri: string 4 magnetUri: string
3 resolution: number 5 resolution: number
@@ -32,5 +34,9 @@ export interface Video {
32 likes: number 34 likes: number
33 dislikes: number 35 dislikes: number
34 nsfw: boolean 36 nsfw: boolean
37}
38
39export interface VideoDetails extends Video {
40 channel: VideoChannel
35 files: VideoFile[] 41 files: VideoFile[]
36} 42}