aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/view
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-04-05 15:15:09 +0200
committerChocobozzz <chocobozzz@cpy.re>2022-04-15 09:49:35 +0200
commitdfbcefc20dc64f0814b1f2e8e782a4ea1bd24db2 (patch)
tree887521117856c06e6c814a0eb79d67f85ffe8eff /server/models/view
parentd74bb0647c79748860ad39c4b7b1be59504b47b7 (diff)
downloadPeerTube-dfbcefc20dc64f0814b1f2e8e782a4ea1bd24db2.tar.gz
PeerTube-dfbcefc20dc64f0814b1f2e8e782a4ea1bd24db2.tar.zst
PeerTube-dfbcefc20dc64f0814b1f2e8e782a4ea1bd24db2.zip
Improve views/viewers documentation
Diffstat (limited to 'server/models/view')
-rw-r--r--server/models/view/local-video-viewer.ts7
-rw-r--r--server/models/view/video-view.ts7
2 files changed, 14 insertions, 0 deletions
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'
8import { VideoModel } from '../video/video' 8import { VideoModel } from '../video/video'
9import { LocalVideoViewerWatchSectionModel } from './local-video-viewer-watch-section' 9import { LocalVideoViewerWatchSectionModel } from './local-video-viewer-watch-section'
10 10
11/**
12 *
13 * Aggregate viewers of local videos only to display statistics to video owners
14 * A viewer is a user that watched one or multiple sections of a specific video inside a time window
15 *
16 */
17
11@Table({ 18@Table({
12 tableName: 'localVideoViewer', 19 tableName: 'localVideoViewer',
13 updatedAt: false, 20 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
3import { AttributesOnly } from '@shared/typescript-utils' 3import { AttributesOnly } from '@shared/typescript-utils'
4import { VideoModel } from '../video/video' 4import { VideoModel } from '../video/video'
5 5
6/**
7 *
8 * Aggregate views of all videos federated with our instance
9 * Mainly used by the trending/hot algorithms
10 *
11 */
12
6@Table({ 13@Table({
7 tableName: 'videoView', 14 tableName: 'videoView',
8 updatedAt: false, 15 updatedAt: false,