aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/types/models/abuse/abuse-message.ts
blob: 2d7d093167007b61fb9c528abd7ebf3befe8cbd9 (plain) (tree)
1
2
                                                                      
                                                   

















                                                                                            
import { AbuseMessageModel } from '@server/models/abuse/abuse-message'
import { PickWith } from '@shared/typescript-utils'
import { AbuseModel } from '../../../models/abuse/abuse'
import { MAccountFormattable } from '../account'

type Use<K extends keyof AbuseMessageModel, M> = PickWith<AbuseMessageModel, K, M>

// ############################################################################

export type MAbuseMessage = Omit<AbuseMessageModel, 'Account' | 'Abuse' | 'toFormattedJSON'>

export type MAbuseMessageId = Pick<AbuseModel, 'id'>

// ############################################################################

// Format for API

export type MAbuseMessageFormattable =
  MAbuseMessage &
  Use<'Account', MAccountFormattable>