sepia-search-motore-di-rice.../server/types/channel.model.ts

44 lines
1.0 KiB
TypeScript
Raw Permalink Normal View History

import { VideoChannel, VideoChannelSummary } from '@peertube/peertube-types'
import { DBActorImage } from './actor.model'
2021-06-24 15:18:54 +02:00
import { IndexableDoc } from './indexable-doc.model'
import { DBAccount } from './account.model'
2020-02-19 15:39:35 +01:00
export interface IndexableChannel extends VideoChannel, IndexableDoc {
}
interface DBChannelShared {
handle: string
avatar: DBActorImage
avatars: DBActorImage[]
}
type IgnoredChannelFields = 'ownerAccount' | 'isLocal' | 'createdAt' | 'updatedAt' | 'avatar' | 'avatars' | 'banner' | 'banners'
export interface DBChannel extends DBChannelShared, Omit<VideoChannel, IgnoredChannelFields> {
indexedAt: number
2020-06-09 14:29:20 +02:00
primaryKey: string
2022-02-26 12:52:51 +01:00
ownerAccount?: DBAccount
2020-08-27 14:44:21 +02:00
banner: DBActorImage
banners: DBActorImage[]
createdAt: number
updatedAt: number
_rankingScore?: number
2020-02-19 15:39:35 +01:00
}
export interface DBChannelSummary extends DBChannelShared, Omit<VideoChannelSummary, 'avatar' | 'avatars'> {
2020-02-19 15:39:35 +01:00
}
2020-08-27 14:44:21 +02:00
// Results from the search API
export interface APIVideoChannel extends VideoChannel {
2022-12-20 15:35:09 +01:00
videosCount: number
2020-08-27 14:44:21 +02:00
score: number
}