]>
Commit | Line | Data |
---|---|---|
453e83ea C |
1 | import { VideoFileModel } from '../../../models/video/video-file' |
2 | import { PickWith, PickWithOpt } from '../../utils' | |
3 | import { MVideo, MVideoUUID } from './video' | |
4 | import { MVideoRedundancyFileUrl } from './video-redundancy' | |
5 | ||
0283eaac C |
6 | type Use<K extends keyof VideoFileModel, M> = PickWith<VideoFileModel, K, M> |
7 | ||
8 | // ############################################################################ | |
9 | ||
453e83ea C |
10 | export type MVideoFile = Omit<VideoFileModel, 'Video' | 'RedundancyVideos'> |
11 | ||
12 | export type MVideoFileVideo = MVideoFile & | |
0283eaac | 13 | Use<'Video', MVideo> |
453e83ea C |
14 | |
15 | export type MVideoFileVideoUUID = MVideoFile & | |
0283eaac | 16 | Use<'Video', MVideoUUID> |
453e83ea C |
17 | |
18 | export type MVideoFileRedundanciesOpt = MVideoFile & | |
19 | PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> |