From dfbcefc20dc64f0814b1f2e8e782a4ea1bd24db2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 5 Apr 2022 15:15:09 +0200 Subject: Improve views/viewers documentation --- server/models/view/local-video-viewer.ts | 7 +++++++ server/models/view/video-view.ts | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'server/models/view') diff --git a/server/models/view/local-video-viewer.ts b/server/models/view/local-video-viewer.ts index 6f8de53cd..1491acb9e 100644 --- a/server/models/view/local-video-viewer.ts +++ b/server/models/view/local-video-viewer.ts @@ -8,6 +8,13 @@ import { AttributesOnly } from '@shared/typescript-utils' import { VideoModel } from '../video/video' import { LocalVideoViewerWatchSectionModel } from './local-video-viewer-watch-section' +/** + * + * Aggregate viewers of local videos only to display statistics to video owners + * A viewer is a user that watched one or multiple sections of a specific video inside a time window + * + */ + @Table({ tableName: 'localVideoViewer', updatedAt: false, diff --git a/server/models/view/video-view.ts b/server/models/view/video-view.ts index df462e631..1504a364e 100644 --- a/server/models/view/video-view.ts +++ b/server/models/view/video-view.ts @@ -3,6 +3,13 @@ import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Model, T import { AttributesOnly } from '@shared/typescript-utils' import { VideoModel } from '../video/video' +/** + * + * Aggregate views of all videos federated with our instance + * Mainly used by the trending/hot algorithms + * + */ + @Table({ tableName: 'videoView', updatedAt: false, -- cgit v1.2.3