From 2b02c520e66ea452687cab39401b371711caa9ed Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 May 2021 11:27:40 +0200 Subject: Cleanup shared models --- shared/models/videos/comment/index.ts | 1 + .../models/videos/comment/video-comment.model.ts | 46 ++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 shared/models/videos/comment/index.ts create mode 100644 shared/models/videos/comment/video-comment.model.ts (limited to 'shared/models/videos/comment') diff --git a/shared/models/videos/comment/index.ts b/shared/models/videos/comment/index.ts new file mode 100644 index 000000000..7b9261a36 --- /dev/null +++ b/shared/models/videos/comment/index.ts @@ -0,0 +1 @@ +export * from './video-comment.model' diff --git a/shared/models/videos/comment/video-comment.model.ts b/shared/models/videos/comment/video-comment.model.ts new file mode 100644 index 000000000..79c0e4c0a --- /dev/null +++ b/shared/models/videos/comment/video-comment.model.ts @@ -0,0 +1,46 @@ +import { Account } from '../../actors' + +export interface VideoComment { + id: number + url: string + text: string + threadId: number + inReplyToCommentId: number + videoId: number + createdAt: Date | string + updatedAt: Date | string + deletedAt: Date | string + isDeleted: boolean + totalRepliesFromVideoAuthor: number + totalReplies: number + account: Account +} + +export interface VideoCommentAdmin { + id: number + url: string + text: string + + threadId: number + inReplyToCommentId: number + + createdAt: Date | string + updatedAt: Date | string + + account: Account + + video: { + id: number + uuid: string + name: string + } +} + +export interface VideoCommentThreadTree { + comment: VideoComment + children: VideoCommentThreadTree[] +} + +export interface VideoCommentCreate { + text: string +} -- cgit v1.2.3