diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-11 11:15:29 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-11 11:32:31 +0200 |
commit | 7d9ba5c08999c6482f0bc5e0c09c6f55b7724090 (patch) | |
tree | 5f4ea1f06dcb781c9e61062522b53a28a401111f /server/types/models/abuse/abuse-message.ts | |
parent | c07902b9083ab5756436cd020bed5bdfa51028bf (diff) | |
download | PeerTube-7d9ba5c08999c6482f0bc5e0c09c6f55b7724090.tar.gz PeerTube-7d9ba5c08999c6482f0bc5e0c09c6f55b7724090.tar.zst PeerTube-7d9ba5c08999c6482f0bc5e0c09c6f55b7724090.zip |
Cleanup models directory organization
Diffstat (limited to 'server/types/models/abuse/abuse-message.ts')
-rw-r--r-- | server/types/models/abuse/abuse-message.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/server/types/models/abuse/abuse-message.ts b/server/types/models/abuse/abuse-message.ts new file mode 100644 index 000000000..565eca706 --- /dev/null +++ b/server/types/models/abuse/abuse-message.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { AbuseMessageModel } from '@server/models/abuse/abuse-message' | ||
2 | import { PickWith } from '@shared/core-utils' | ||
3 | import { AbuseModel } from '../../../models/abuse/abuse' | ||
4 | import { MAccountFormattable } from '../account' | ||
5 | |||
6 | type Use<K extends keyof AbuseMessageModel, M> = PickWith<AbuseMessageModel, K, M> | ||
7 | |||
8 | // ############################################################################ | ||
9 | |||
10 | export type MAbuseMessage = Omit<AbuseMessageModel, 'Account' | 'Abuse' | 'toFormattedJSON'> | ||
11 | |||
12 | export type MAbuseMessageId = Pick<AbuseModel, 'id'> | ||
13 | |||
14 | // ############################################################################ | ||
15 | |||
16 | // Format for API | ||
17 | |||
18 | export type MAbuseMessageFormattable = | ||
19 | MAbuseMessage & | ||
20 | Use<'Account', MAccountFormattable> | ||