1 import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
2 import { PickWith } from '@server/typings/utils'
3 import { MAccountAudience, MAccountUrl, MVideo, MVideoFormattable } from '..'
5 type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M>
7 // ############################################################################
9 export type MAccountVideoRate = Omit<AccountVideoRateModel, 'Video' | 'Account'>
11 export type MAccountVideoRateAccountUrl = MAccountVideoRate &
12 Use<'Account', MAccountUrl>
14 export type MAccountVideoRateAccountVideo = MAccountVideoRate &
15 Use<'Account', MAccountAudience> &
18 // ############################################################################
20 // Format for API or AP object
22 export type MAccountVideoRateFormattable = Pick<MAccountVideoRate, 'type'> &
23 Use<'Video', MVideoFormattable>