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