1 import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
2 import { PickWith } from '@server/typings/utils'
3 import { MAccountAudience, MAccountUrl } from '../account/account'
4 import { MVideo, MVideoFormattable } from './video'
6 type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M>
8 // ############################################################################
10 export type MAccountVideoRate = Omit<AccountVideoRateModel, 'Video' | 'Account'>
12 export type MAccountVideoRateAccountUrl = MAccountVideoRate &
13 Use<'Account', MAccountUrl>
15 export type MAccountVideoRateAccountVideo = MAccountVideoRate &
16 Use<'Account', MAccountAudience> &
19 // ############################################################################
21 // Format for API or AP object
23 export type MAccountVideoRateFormattable = Pick<MAccountVideoRate, 'type'> &
24 Use<'Video', MVideoFormattable>