diff options
Diffstat (limited to 'shared/models/actors')
-rw-r--r-- | shared/models/actors/account.model.ts | 4 | ||||
-rw-r--r-- | shared/models/actors/actor-image.model.ts | 8 | ||||
-rw-r--r-- | shared/models/actors/actor-image.type.ts | 4 | ||||
-rw-r--r-- | shared/models/actors/actor.model.ts | 4 | ||||
-rw-r--r-- | shared/models/actors/index.ts | 2 |
5 files changed, 18 insertions, 4 deletions
diff --git a/shared/models/actors/account.model.ts b/shared/models/actors/account.model.ts index 2ff4b9f5e..120dec271 100644 --- a/shared/models/actors/account.model.ts +++ b/shared/models/actors/account.model.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { ActorImage } from './actor-image.model' | ||
1 | import { Actor } from './actor.model' | 2 | import { Actor } from './actor.model' |
2 | import { Avatar } from '../avatars' | ||
3 | 3 | ||
4 | export interface Account extends Actor { | 4 | export interface Account extends Actor { |
5 | displayName: string | 5 | displayName: string |
@@ -14,5 +14,5 @@ export interface AccountSummary { | |||
14 | displayName: string | 14 | displayName: string |
15 | url: string | 15 | url: string |
16 | host: string | 16 | host: string |
17 | avatar?: Avatar | 17 | avatar?: ActorImage |
18 | } | 18 | } |
diff --git a/shared/models/actors/actor-image.model.ts b/shared/models/actors/actor-image.model.ts new file mode 100644 index 000000000..ad5eab627 --- /dev/null +++ b/shared/models/actors/actor-image.model.ts | |||
@@ -0,0 +1,8 @@ | |||
1 | export interface ActorImage { | ||
2 | path: string | ||
3 | |||
4 | url?: string | ||
5 | |||
6 | createdAt: Date | string | ||
7 | updatedAt: Date | string | ||
8 | } | ||
diff --git a/shared/models/actors/actor-image.type.ts b/shared/models/actors/actor-image.type.ts new file mode 100644 index 000000000..ac8eb6bf2 --- /dev/null +++ b/shared/models/actors/actor-image.type.ts | |||
@@ -0,0 +1,4 @@ | |||
1 | export const enum ActorImageType { | ||
2 | AVATAR = 1, | ||
3 | BANNER = 2 | ||
4 | } | ||
diff --git a/shared/models/actors/actor.model.ts b/shared/models/actors/actor.model.ts index 1dbf5f638..7d9f35b10 100644 --- a/shared/models/actors/actor.model.ts +++ b/shared/models/actors/actor.model.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Avatar } from '../avatars/avatar.model' | 1 | import { ActorImage } from './actor-image.model' |
2 | 2 | ||
3 | export interface Actor { | 3 | export interface Actor { |
4 | id: number | 4 | id: number |
@@ -9,5 +9,5 @@ export interface Actor { | |||
9 | followersCount: number | 9 | followersCount: number |
10 | createdAt: Date | string | 10 | createdAt: Date | string |
11 | updatedAt: Date | string | 11 | updatedAt: Date | string |
12 | avatar?: Avatar | 12 | avatar?: ActorImage |
13 | } | 13 | } |
diff --git a/shared/models/actors/index.ts b/shared/models/actors/index.ts index c7a92399d..156f83248 100644 --- a/shared/models/actors/index.ts +++ b/shared/models/actors/index.ts | |||
@@ -1,3 +1,5 @@ | |||
1 | export * from './account.model' | 1 | export * from './account.model' |
2 | export * from './actor-image.model' | ||
3 | export * from './actor-image.type' | ||
2 | export * from './actor.model' | 4 | export * from './actor.model' |
3 | export * from './follow.model' | 5 | export * from './follow.model' |