]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/videos/channel/video-channel.model.ts
Add videos count in channels list
[github/Chocobozzz/PeerTube.git] / shared / models / videos / channel / video-channel.model.ts
index 92918f66cae1133a447b7faec249fe8331b858d1..32829e92a053194467b5a47462dc6573ab1603a2 100644 (file)
@@ -1,6 +1,11 @@
 import { Actor } from '../../actors/actor.model'
-import { Video } from '../video.model'
 import { Account } from '../../actors/index'
+import { Avatar } from '../../avatars'
+
+export type ViewsPerDate = {
+  date: Date
+  views: number
+}
 
 export interface VideoChannel extends Actor {
   displayName: string
@@ -8,4 +13,16 @@ export interface VideoChannel extends Actor {
   support: string
   isLocal: boolean
   ownerAccount?: Account
+
+  videosCount?: number
+  viewsPerDay?: ViewsPerDate[] // chronologically ordered
+}
+
+export interface VideoChannelSummary {
+  id: number
+  name: string
+  displayName: string
+  url: string
+  host: string
+  avatar?: Avatar
 }