aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-abuse.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-20 13:52:49 +0200
committerChocobozzz <me@florianbigard.com>2019-08-20 14:53:42 +0200
commit0283eaac2a8e73006c66df3cf5bb9012e37450e5 (patch)
tree1fb73aeef57f984a77f47828ade23c6365ce8eb0 /server/typings/models/video/video-abuse.ts
parent96ca24f00e5ae5471dee9ee596489fe50af2b46f (diff)
downloadPeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.gz
PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.tar.zst
PeerTube-0283eaac2a8e73006c66df3cf5bb9012e37450e5.zip
Cleanup model types
Diffstat (limited to 'server/typings/models/video/video-abuse.ts')
-rw-r--r--server/typings/models/video/video-abuse.ts14
1 files changed, 11 insertions, 3 deletions
diff --git a/server/typings/models/video/video-abuse.ts b/server/typings/models/video/video-abuse.ts
index 1667ae55a..0474cac5b 100644
--- a/server/typings/models/video/video-abuse.ts
+++ b/server/typings/models/video/video-abuse.ts
@@ -3,13 +3,21 @@ import { PickWith } from '../../utils'
3import { MVideo } from './video' 3import { MVideo } from './video'
4import { MAccountDefault } from '../account' 4import { MAccountDefault } from '../account'
5 5
6type Use<K extends keyof VideoAbuseModel, M> = PickWith<VideoAbuseModel, K, M>
7
8// ############################################################################
9
6export type MVideoAbuse = Omit<VideoAbuseModel, 'Account' | 'Video' | 'toActivityPubObject'> 10export type MVideoAbuse = Omit<VideoAbuseModel, 'Account' | 'Video' | 'toActivityPubObject'>
7 11
12// ############################################################################
13
8export type MVideoAbuseId = Pick<VideoAbuseModel, 'id'> 14export type MVideoAbuseId = Pick<VideoAbuseModel, 'id'>
9 15
10export type MVideoAbuseVideo = MVideoAbuse & 16export type MVideoAbuseVideo = MVideoAbuse &
11 Pick<VideoAbuseModel, 'toActivityPubObject'> & 17 Pick<VideoAbuseModel, 'toActivityPubObject'> &
12 PickWith<VideoAbuseModel, 'Video', MVideo> 18 Use<'Video', MVideo>
13 19
14export type MVideoAbuseAccountVideo = MVideoAbuseVideo & 20export type MVideoAbuseAccountVideo = MVideoAbuse &
15 PickWith<VideoAbuseModel, 'Account', MAccountDefault> 21 Pick<VideoAbuseModel, 'toActivityPubObject'> &
22 Use<'Video', MVideo> &
23 Use<'Account', MAccountDefault>