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
18 constructor (hash: VideoCommentServerModel) {
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
30 this.by = Account.CREATE_BY_STRING(this.account.name, this.account.host)