aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/actors/account.model.ts14
-rw-r--r--shared/models/actors/actor.model.ts14
-rw-r--r--shared/models/actors/follow.model.ts7
-rw-r--r--shared/models/videos/video-channel.model.ts9
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 @@
1import { Avatar } from '../avatars/avatar.model' 1import { Actor } from './actor.model'
2 2
3export interface Account { 3export 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 @@
1import { Avatar } from '../avatars/avatar.model'
2
3export 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 @@
1import { Account } from './account.model' 1import { Actor } from './actor.model'
2 2
3export type FollowState = 'pending' | 'accepted' 3export type FollowState = 'pending' | 'accepted'
4 4
5export interface AccountFollow { 5export 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 @@
1import { Actor } from '../actors/actor.model'
1import { Video } from './video.model' 2import { Video } from './video.model'
2 3
3export interface VideoChannel { 4export 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