aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/types/models/video/video-live.ts
blob: a899edfa60a9fe2de25a6481b69cfe7e2ac1d89d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { VideoLiveModel } from '@server/models/video/video-live'
import { PickWith } from '@shared/typescript-utils'
import { MVideo } from './video'
import { MLiveReplaySetting } from './video-live-replay-setting'

type Use<K extends keyof VideoLiveModel, M> = PickWith<VideoLiveModel, K, M>

// ############################################################################

export type MVideoLive = Omit<VideoLiveModel, 'Video' | 'ReplaySetting'>

// ############################################################################

export type MVideoLiveVideo =
  MVideoLive &
  Use<'Video', MVideo>

// ############################################################################

export type MVideoLiveVideoWithSetting =
  MVideoLiveVideo &
  Use<'ReplaySetting', MLiveReplaySetting>