From 2295ce6c4e7ba805cc100ff961527bebc2cd89e5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Dec 2017 10:34:40 +0100 Subject: Add account avatar --- shared/models/accounts/account.model.ts | 8 ++++++++ shared/models/avatars/avatar.model.ts | 5 +++++ shared/models/users/user.model.ts | 8 +++----- 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 shared/models/avatars/avatar.model.ts (limited to 'shared/models') 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 @@ +import { Avatar } from '../avatars/avatar.model' + export interface Account { id: number + uuid: string name: string host: string + followingCount: number + followersCount: number + createdAt: Date + updatedAt: Date + avatar: Avatar } 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 @@ +export interface Avatar { + path: string + createdAt: Date | string + updatedAt: Date | string +} 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 @@ +import { Account } from '../accounts' import { VideoChannel } from '../videos/video-channel.model' import { UserRole } from './user-role' @@ -8,10 +9,7 @@ export interface User { displayNSFW: boolean role: UserRole videoQuota: number - createdAt: Date, - account: { - id: number - uuid: string - } + createdAt: Date + account: Account videoChannels?: VideoChannel[] } -- cgit v1.2.3 From b1fa3eba70dbd7d9e5b795ad251e293c88ebeee2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 6 Dec 2017 17:15:59 +0100 Subject: Begin video watch design --- shared/models/videos/video.model.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'shared/models') 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 @@ +import { Account } from '../accounts' import { VideoChannel } from './video-channel.model' import { VideoPrivacy } from './video-privacy.enum' @@ -13,7 +14,7 @@ export interface VideoFile { export interface Video { id: number uuid: string - account: string + accountName: string createdAt: Date | string updatedAt: Date | string categoryLabel: string @@ -43,4 +44,5 @@ export interface VideoDetails extends Video { descriptionPath: string channel: VideoChannel files: VideoFile[] + account: Account } -- cgit v1.2.3 From baeefe22caf8ae6cb58dc40754e5db14b50168bf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 Dec 2017 17:22:44 +0100 Subject: First upload step is ok --- shared/models/videos/video-create.model.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'shared/models') 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 @@ import { VideoPrivacy } from './video-privacy.enum' export interface VideoCreate { - category: number - licence: number - language: number - description: string + category?: number + licence?: number + language?: number + description?: string channelId: number nsfw: boolean name: string - tags: string[] + tags?: string[] privacy: VideoPrivacy } -- cgit v1.2.3