Stronger model typings
[oweals/peertube.git] / server / typings / models / video / video-rate.ts
1 import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
2 import { PickWith } from '@server/typings/utils'
3 import { MAccountAudience, MAccountUrl, MVideo } from '..'
4
5 export type MAccountVideoRate = Omit<AccountVideoRateModel, 'Video' | 'Account'>
6
7 export type MAccountVideoRateAccountUrl = MAccountVideoRate &
8   PickWith<AccountVideoRateModel, 'Account', MAccountUrl>
9
10 export type MAccountVideoRateAccountVideo = MAccountVideoRate &
11   PickWith<AccountVideoRateModel, 'Account', MAccountAudience> &
12   PickWith<AccountVideoRateModel, 'Video', MVideo>