aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/models/accounts/account.model.ts8
-rw-r--r--shared/models/avatars/avatar.model.ts5
-rw-r--r--shared/models/users/user.model.ts8
-rw-r--r--shared/models/videos/video-create.model.ts10
-rw-r--r--shared/models/videos/video.model.ts4
5 files changed, 24 insertions, 11 deletions
diff --git a/shared/models/accounts/account.model.ts b/shared/models/accounts/account.model.ts
index 338426dc7..d14701317 100644
--- a/shared/models/accounts/account.model.ts
+++ b/shared/models/accounts/account.model.ts
@@ -1,5 +1,13 @@
1import { Avatar } from '../avatars/avatar.model'
2
1export interface Account { 3export interface Account {
2 id: number 4 id: number
5 uuid: string
3 name: string 6 name: string
4 host: string 7 host: string
8 followingCount: number
9 followersCount: number
10 createdAt: Date
11 updatedAt: Date
12 avatar: Avatar
5} 13}
diff --git a/shared/models/avatars/avatar.model.ts b/shared/models/avatars/avatar.model.ts
new file mode 100644
index 000000000..301d00929
--- /dev/null
+++ b/shared/models/avatars/avatar.model.ts
@@ -0,0 +1,5 @@
1export interface Avatar {
2 path: string
3 createdAt: Date | string
4 updatedAt: Date | string
5}
diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts
index a8012734c..4b17881e5 100644
--- a/shared/models/users/user.model.ts
+++ b/shared/models/users/user.model.ts
@@ -1,3 +1,4 @@
1import { Account } from '../accounts'
1import { VideoChannel } from '../videos/video-channel.model' 2import { VideoChannel } from '../videos/video-channel.model'
2import { UserRole } from './user-role' 3import { UserRole } from './user-role'
3 4
@@ -8,10 +9,7 @@ export interface User {
8 displayNSFW: boolean 9 displayNSFW: boolean
9 role: UserRole 10 role: UserRole
10 videoQuota: number 11 videoQuota: number
11 createdAt: Date, 12 createdAt: Date
12 account: { 13 account: Account
13 id: number
14 uuid: string
15 }
16 videoChannels?: VideoChannel[] 14 videoChannels?: VideoChannel[]
17} 15}
diff --git a/shared/models/videos/video-create.model.ts b/shared/models/videos/video-create.model.ts
index e537c38a8..8bc6a6639 100644
--- a/shared/models/videos/video-create.model.ts
+++ b/shared/models/videos/video-create.model.ts
@@ -1,13 +1,13 @@
1import { VideoPrivacy } from './video-privacy.enum' 1import { VideoPrivacy } from './video-privacy.enum'
2 2
3export interface VideoCreate { 3export interface VideoCreate {
4 category: number 4 category?: number
5 licence: number 5 licence?: number
6 language: number 6 language?: number
7 description: string 7 description?: string
8 channelId: number 8 channelId: number
9 nsfw: boolean 9 nsfw: boolean
10 name: string 10 name: string
11 tags: string[] 11 tags?: string[]
12 privacy: VideoPrivacy 12 privacy: VideoPrivacy
13} 13}
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts
index 08b29425c..dc12a05d9 100644
--- a/shared/models/videos/video.model.ts
+++ b/shared/models/videos/video.model.ts
@@ -1,3 +1,4 @@
1import { Account } from '../accounts'
1import { VideoChannel } from './video-channel.model' 2import { VideoChannel } from './video-channel.model'
2import { VideoPrivacy } from './video-privacy.enum' 3import { VideoPrivacy } from './video-privacy.enum'
3 4
@@ -13,7 +14,7 @@ export interface VideoFile {
13export interface Video { 14export interface Video {
14 id: number 15 id: number
15 uuid: string 16 uuid: string
16 account: string 17 accountName: string
17 createdAt: Date | string 18 createdAt: Date | string
18 updatedAt: Date | string 19 updatedAt: Date | string
19 categoryLabel: string 20 categoryLabel: string
@@ -43,4 +44,5 @@ export interface VideoDetails extends Video {
43 descriptionPath: string 44 descriptionPath: string
44 channel: VideoChannel 45 channel: VideoChannel
45 files: VideoFile[] 46 files: VideoFile[]
47 account: Account
46} 48}