1 import { VideoCommentModel } from '../../../models/video/video-comment'
2 import { PickWith } from '../../utils'
3 import { MAccountDefault } from '../account'
4 import { MVideoAccountLight, MVideoFeed, MVideoIdUrl } from './video'
6 type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K, M>
8 // ############################################################################
10 export type MComment = Omit<VideoCommentModel, 'OriginVideoComment' | 'InReplyToVideoComment' | 'Video' | 'Account'>
11 export type MCommentId = Pick<MComment, 'id'>
13 // ############################################################################
15 export type MCommentOwner = MComment &
16 Use<'Account', MAccountDefault>
18 export type MCommentVideo = MComment &
19 Use<'Video', MVideoAccountLight>
21 export type MCommentReply = MComment &
22 Use<'InReplyToVideoComment', MComment>
24 export type MCommentOwnerVideo = MComment &
25 Use<'Account', MAccountDefault> &
26 Use<'Video', MVideoAccountLight>
28 export type MCommentOwnerVideoReply = MComment &
29 Use<'Account', MAccountDefault> &
30 Use<'Video', MVideoAccountLight> &
31 Use<'InReplyToVideoComment', MComment>
33 export type MCommentOwnerReplyVideoLight = MComment &
34 Use<'Account', MAccountDefault> &
35 Use<'InReplyToVideoComment', MComment> &
36 Use<'Video', MVideoIdUrl>
38 export type MCommentOwnerVideoFeed = MCommentOwner &
39 Use<'Video', MVideoFeed>
41 // ############################################################################
43 export type MCommentAPI = MComment & { totalReplies: number }