diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-20 13:52:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-20 14:53:42 +0200 |
commit | 0283eaac2a8e73006c66df3cf5bb9012e37450e5 (patch) | |
tree | 1fb73aeef57f984a77f47828ade23c6365ce8eb0 /server/typings/models/video/video-abuse.ts | |
parent | 96ca24f00e5ae5471dee9ee596489fe50af2b46f (diff) | |
download | PeerTube-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.ts | 14 |
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' | |||
3 | import { MVideo } from './video' | 3 | import { MVideo } from './video' |
4 | import { MAccountDefault } from '../account' | 4 | import { MAccountDefault } from '../account' |
5 | 5 | ||
6 | type Use<K extends keyof VideoAbuseModel, M> = PickWith<VideoAbuseModel, K, M> | ||
7 | |||
8 | // ############################################################################ | ||
9 | |||
6 | export type MVideoAbuse = Omit<VideoAbuseModel, 'Account' | 'Video' | 'toActivityPubObject'> | 10 | export type MVideoAbuse = Omit<VideoAbuseModel, 'Account' | 'Video' | 'toActivityPubObject'> |
7 | 11 | ||
12 | // ############################################################################ | ||
13 | |||
8 | export type MVideoAbuseId = Pick<VideoAbuseModel, 'id'> | 14 | export type MVideoAbuseId = Pick<VideoAbuseModel, 'id'> |
9 | 15 | ||
10 | export type MVideoAbuseVideo = MVideoAbuse & | 16 | export type MVideoAbuseVideo = MVideoAbuse & |
11 | Pick<VideoAbuseModel, 'toActivityPubObject'> & | 17 | Pick<VideoAbuseModel, 'toActivityPubObject'> & |
12 | PickWith<VideoAbuseModel, 'Video', MVideo> | 18 | Use<'Video', MVideo> |
13 | 19 | ||
14 | export type MVideoAbuseAccountVideo = MVideoAbuseVideo & | 20 | export type MVideoAbuseAccountVideo = MVideoAbuse & |
15 | PickWith<VideoAbuseModel, 'Account', MAccountDefault> | 21 | Pick<VideoAbuseModel, 'toActivityPubObject'> & |
22 | Use<'Video', MVideo> & | ||
23 | Use<'Account', MAccountDefault> | ||