]>
Commit | Line | Data |
---|---|---|
b1fa3eba C |
1 | import { Account as ServerAccount } from '../../../../../shared/models/accounts/account.model' |
2 | import { Avatar } from '../../../../../shared/models/avatars/avatar.model' | |
63c4db6d | 3 | import { environment } from '../../../environments/environment' |
b1fa3eba C |
4 | |
5 | export class Account implements ServerAccount { | |
6 | id: number | |
7 | uuid: string | |
8 | name: string | |
9 | host: string | |
10 | followingCount: number | |
11 | followersCount: number | |
12 | createdAt: Date | |
13 | updatedAt: Date | |
14 | avatar: Avatar | |
15 | ||
16 | static GET_ACCOUNT_AVATAR_PATH (account: Account) { | |
17 | if (account && account.avatar) return account.avatar.path | |
18 | ||
63c4db6d | 19 | return environment.apiUrl + '/client/assets/images/default-avatar.png' |
b1fa3eba C |
20 | } |
21 | } |