diff options
Diffstat (limited to 'shared/models/actors')
-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 |
3 files changed, 20 insertions, 15 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 |