aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/shared/video-edit.model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/shared/video-edit.model.ts')
-rw-r--r--client/src/app/videos/shared/video-edit.model.ts31
1 files changed, 31 insertions, 0 deletions
diff --git a/client/src/app/videos/shared/video-edit.model.ts b/client/src/app/videos/shared/video-edit.model.ts
new file mode 100644
index 000000000..f30d8feba
--- /dev/null
+++ b/client/src/app/videos/shared/video-edit.model.ts
@@ -0,0 +1,31 @@
1export class VideoEdit {
2 category: number
3 licence: number
4 language: number
5 description: string
6 name: string
7 tags: string[]
8 nsfw: boolean
9 channel: number
10 uuid?: string
11 id?: number
12
13 patch (values: Object) {
14 Object.keys(values).forEach((key) => {
15 this[key] = values[key]
16 })
17 }
18
19 toJSON () {
20 return {
21 category: this.category,
22 licence: this.licence,
23 language: this.language,
24 description: this.description,
25 name: this.name,
26 tags: this.tags,
27 nsfw: this.nsfw,
28 channel: this.channel
29 }
30 }
31}