diff options
Diffstat (limited to 'shared/models')
-rw-r--r-- | shared/models/actors/account.model.ts | 14 | ||||
-rw-r--r-- | shared/models/actors/actor.model.ts | 14 | ||||
-rw-r--r-- | shared/models/actors/follow.model.ts | 7 | ||||
-rw-r--r-- | shared/models/videos/video-channel.model.ts | 9 |
4 files changed, 23 insertions, 21 deletions
diff --git a/shared/models/actors/account.model.ts b/shared/models/actors/account.model.ts index e4dbc81e5..5cc12c18f 100644 --- a/shared/models/actors/account.model.ts +++ b/shared/models/actors/account.model.ts | |||
@@ -1,15 +1,5 @@ | |||
1 | import { Avatar } from '../avatars/avatar.model' | 1 | import { Actor } from './actor.model' |
2 | 2 | ||
3 | export interface Account { | 3 | export interface Account extends Actor { |
4 | id: number | ||
5 | uuid: string | ||
6 | url: string | ||
7 | name: string | ||
8 | displayName: string | 4 | displayName: string |
9 | host: string | ||
10 | followingCount: number | ||
11 | followersCount: number | ||
12 | createdAt: Date | ||
13 | updatedAt: Date | ||
14 | avatar: Avatar | ||
15 | } | 5 | } |
diff --git a/shared/models/actors/actor.model.ts b/shared/models/actors/actor.model.ts new file mode 100644 index 000000000..f91616519 --- /dev/null +++ b/shared/models/actors/actor.model.ts | |||
@@ -0,0 +1,14 @@ | |||
1 | import { Avatar } from '../avatars/avatar.model' | ||
2 | |||
3 | export interface Actor { | ||
4 | id: number | ||
5 | uuid: string | ||
6 | url: string | ||
7 | name: string | ||
8 | host: string | ||
9 | followingCount: number | ||
10 | followersCount: number | ||
11 | createdAt: Date | ||
12 | updatedAt: Date | ||
13 | avatar: Avatar | ||
14 | } | ||
diff --git a/shared/models/actors/follow.model.ts b/shared/models/actors/follow.model.ts index cdc3da560..70562bfc7 100644 --- a/shared/models/actors/follow.model.ts +++ b/shared/models/actors/follow.model.ts | |||
@@ -1,11 +1,12 @@ | |||
1 | import { Account } from './account.model' | 1 | import { Actor } from './actor.model' |
2 | 2 | ||
3 | export type FollowState = 'pending' | 'accepted' | 3 | export type FollowState = 'pending' | 'accepted' |
4 | 4 | ||
5 | export interface AccountFollow { | 5 | export interface AccountFollow { |
6 | id: number | 6 | id: number |
7 | follower: Account | 7 | follower: Actor |
8 | following: Account | 8 | following: Actor |
9 | score: number | ||
9 | state: FollowState | 10 | state: FollowState |
10 | createdAt: Date | 11 | createdAt: Date |
11 | updatedAt: Date | 12 | updatedAt: Date |
diff --git a/shared/models/videos/video-channel.model.ts b/shared/models/videos/video-channel.model.ts index d1a952826..b164fb555 100644 --- a/shared/models/videos/video-channel.model.ts +++ b/shared/models/videos/video-channel.model.ts | |||
@@ -1,13 +1,10 @@ | |||
1 | import { Actor } from '../actors/actor.model' | ||
1 | import { Video } from './video.model' | 2 | import { Video } from './video.model' |
2 | 3 | ||
3 | export interface VideoChannel { | 4 | export interface VideoChannel extends Actor { |
4 | id: number | 5 | displayName: string |
5 | name: string | ||
6 | url: string | ||
7 | description: string | 6 | description: string |
8 | isLocal: boolean | 7 | isLocal: boolean |
9 | createdAt: Date | string | ||
10 | updatedAt: Date | string | ||
11 | owner?: { | 8 | owner?: { |
12 | name: string | 9 | name: string |
13 | uuid: string | 10 | uuid: string |