aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-blacklist.ts
blob: cc539f95cff4b21007f084aa4ff8af826aa9623b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
import { PickWith } from '@server/typings/utils'
import { MVideo } from '@server/typings/models'

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

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

export type MVideoBlacklist = Omit<VideoBlacklistModel, 'Video'>

export type MVideoBlacklistLight = Pick<MVideoBlacklist, 'id' | 'reason' | 'unfederated'>
export type MVideoBlacklistUnfederated = Pick<MVideoBlacklist, 'unfederated'>

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

export type MVideoBlacklistVideo = MVideoBlacklist &
  Use<'Video', MVideo>