]>
Commit | Line | Data |
---|---|---|
453e83ea C |
1 | import { AccountVideoRateModel } from '@server/models/account/account-video-rate' |
2 | import { PickWith } from '@server/typings/utils' | |
d7a25329 C |
3 | import { MAccountAudience, MAccountUrl } from '../account/account' |
4 | import { MVideo, MVideoFormattable } from './video' | |
453e83ea | 5 | |
0283eaac C |
6 | type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M> |
7 | ||
8 | // ############################################################################ | |
9 | ||
453e83ea C |
10 | export type MAccountVideoRate = Omit<AccountVideoRateModel, 'Video' | 'Account'> |
11 | ||
a1587156 C |
12 | export type MAccountVideoRateAccountUrl = |
13 | MAccountVideoRate & | |
0283eaac | 14 | Use<'Account', MAccountUrl> |
453e83ea | 15 | |
a1587156 C |
16 | export type MAccountVideoRateAccountVideo = |
17 | MAccountVideoRate & | |
0283eaac C |
18 | Use<'Account', MAccountAudience> & |
19 | Use<'Video', MVideo> | |
1ca9f7c3 C |
20 | |
21 | // ############################################################################ | |
22 | ||
23 | // Format for API or AP object | |
24 | ||
a1587156 C |
25 | export type MAccountVideoRateFormattable = |
26 | Pick<MAccountVideoRate, 'type'> & | |
1ca9f7c3 | 27 | Use<'Video', MVideoFormattable> |