1 import { Account } from '@app/shared/account/account.model'
2 import { Account as AccountInterface } from '../../../../../../shared/models/actors'
3 import { VideoComment as VideoCommentServerModel } from '../../../../../../shared/models/videos/video-comment.model'
5 export class VideoComment implements VideoCommentServerModel {
10 inReplyToCommentId: number
12 createdAt: Date | string
13 updatedAt: Date | string
14 account: AccountInterface
19 constructor (hash: VideoCommentServerModel) {
23 this.threadId = hash.threadId
24 this.inReplyToCommentId = hash.inReplyToCommentId
25 this.videoId = hash.videoId
26 this.createdAt = new Date(hash.createdAt.toString())
27 this.updatedAt = new Date(hash.updatedAt.toString())
28 this.account = hash.account
29 this.totalReplies = hash.totalReplies
31 this.by = Account.CREATE_BY_STRING(this.account.name, this.account.host)