2019-08-15 05:53:26 -04:00
|
|
|
import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
|
|
|
|
import { PickWith } from '@server/typings/utils'
|
2019-11-15 09:06:03 -05:00
|
|
|
import { MAccountAudience, MAccountUrl } from '../account/account'
|
|
|
|
import { MVideo, MVideoFormattable } from './video'
|
2019-08-15 05:53:26 -04:00
|
|
|
|
2019-08-20 07:52:49 -04:00
|
|
|
type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M>
|
|
|
|
|
|
|
|
// ############################################################################
|
|
|
|
|
2019-08-15 05:53:26 -04:00
|
|
|
export type MAccountVideoRate = Omit<AccountVideoRateModel, 'Video' | 'Account'>
|
|
|
|
|
|
|
|
export type MAccountVideoRateAccountUrl = MAccountVideoRate &
|
2019-08-20 07:52:49 -04:00
|
|
|
Use<'Account', MAccountUrl>
|
2019-08-15 05:53:26 -04:00
|
|
|
|
|
|
|
export type MAccountVideoRateAccountVideo = MAccountVideoRate &
|
2019-08-20 07:52:49 -04:00
|
|
|
Use<'Account', MAccountAudience> &
|
|
|
|
Use<'Video', MVideo>
|
2019-08-20 13:05:31 -04:00
|
|
|
|
|
|
|
// ############################################################################
|
|
|
|
|
|
|
|
// Format for API or AP object
|
|
|
|
|
|
|
|
export type MAccountVideoRateFormattable = Pick<MAccountVideoRate, 'type'> &
|
|
|
|
Use<'Video', MVideoFormattable>
|