2020-05-28 16:32:49 +02:00
|
|
|
import { VideoChannel, VideoChannelSummary } from '@shared/models/videos/channel/video-channel.model'
|
|
|
|
import { Account, AccountSummary } from '@shared/models/actors/account.model'
|
2020-02-14 16:14:45 +01:00
|
|
|
import { Video, VideoDetails } from '@shared/models/videos/video.model'
|
2020-02-19 15:39:35 +01:00
|
|
|
import { IndexableDoc } from './elastic-search.model'
|
2020-06-09 14:29:20 +02:00
|
|
|
import { Avatar } from '@shared/models'
|
|
|
|
|
|
|
|
type ActorExtended = {
|
|
|
|
handle: string
|
|
|
|
avatar: Avatar & { url: string }
|
|
|
|
}
|
2020-02-14 16:14:45 +01:00
|
|
|
|
|
|
|
export interface IndexableVideo extends Video, IndexableDoc {
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IndexableVideoDetails extends VideoDetails, IndexableDoc {
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DBVideoDetails extends Omit<VideoDetails, 'isLocal'> {
|
|
|
|
indexedAt: Date
|
|
|
|
host: string
|
2020-05-28 16:32:49 +02:00
|
|
|
|
2020-06-09 14:29:20 +02:00
|
|
|
account: Account & ActorExtended
|
|
|
|
channel: VideoChannel & ActorExtended
|
2020-02-14 16:14:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface DBVideo extends Omit<Video, 'isLocal'> {
|
|
|
|
indexedAt: Date
|
|
|
|
host: string
|
2020-06-05 14:37:39 +02:00
|
|
|
url: string
|
2020-05-28 16:32:49 +02:00
|
|
|
|
2020-06-09 14:29:20 +02:00
|
|
|
account: AccountSummary & ActorExtended
|
|
|
|
channel: VideoChannelSummary & ActorExtended
|
2020-02-14 16:14:45 +01:00
|
|
|
}
|