aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/actors
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models/actors')
-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
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 @@
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