]>
Commit | Line | Data |
---|---|---|
76d36e0b C |
1 | import { Account } from '@app/shared/account/account.model' |
2 | import { Account as AccountInterface } from '../../../../../../shared/models/actors' | |
4635f59d C |
3 | import { VideoComment as VideoCommentServerModel } from '../../../../../../shared/models/videos/video-comment.model' |
4 | ||
5 | export class VideoComment implements VideoCommentServerModel { | |
6 | id: number | |
7 | url: string | |
8 | text: string | |
9 | threadId: number | |
10 | inReplyToCommentId: number | |
11 | videoId: number | |
12 | createdAt: Date | string | |
13 | updatedAt: Date | string | |
76d36e0b | 14 | account: AccountInterface |
4635f59d | 15 | totalReplies: number |
4635f59d C |
16 | by: string |
17 | ||
4635f59d C |
18 | constructor (hash: VideoCommentServerModel) { |
19 | this.id = hash.id | |
20 | this.url = hash.url | |
21 | this.text = hash.text | |
22 | this.threadId = hash.threadId | |
23 | this.inReplyToCommentId = hash.inReplyToCommentId | |
24 | this.videoId = hash.videoId | |
25 | this.createdAt = new Date(hash.createdAt.toString()) | |
26 | this.updatedAt = new Date(hash.updatedAt.toString()) | |
27 | this.account = hash.account | |
28 | this.totalReplies = hash.totalReplies | |
29 | ||
76d36e0b | 30 | this.by = Account.CREATE_BY_STRING(this.account.name, this.account.host) |
4635f59d C |
31 | } |
32 | } |