aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-change-ownership.ts
blob: 0410115c6b22189c630964fece6f930bbfab76a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership'
import { PickWith } from '@server/typings/utils'
import { MAccountDefault, MVideoWithFileThumbnail } from '@server/typings/models'

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

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

export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator' | 'NextOwner' | 'Video'>

export type MVideoChangeOwnershipFull = MVideoChangeOwnership &
  Use<'Initiator', MAccountDefault> &
  Use<'NextOwner', MAccountDefault> &
  Use<'Video', MVideoWithFileThumbnail>