]>
Commit | Line | Data |
---|---|---|
1 | import { Account as ServerAccount } from '../../../../../shared/models/accounts/account.model' | |
2 | import { Avatar } from '../../../../../shared/models/avatars/avatar.model' | |
3 | import { environment } from '../../../environments/environment' | |
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 | ||
19 | return '/client/assets/images/default-avatar.png' | |
20 | } | |
21 | } |