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') 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