fix change ownership typing
This commit is contained in:
parent
4ee63ec648
commit
b8b3abac6a
|
@ -1,7 +1,7 @@
|
||||||
import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership'
|
import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership'
|
||||||
import { PickWith } from '@shared/core-utils'
|
import { PickWith } from '@shared/core-utils'
|
||||||
import { MAccountDefault, MAccountFormattable } from '../account/account'
|
import { MAccountDefault, MAccountFormattable } from '../account/account'
|
||||||
import { MVideo, MVideoWithAllFiles } from './video'
|
import { MVideoWithAllFiles, MVideoFormattable } from './video'
|
||||||
|
|
||||||
type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M>
|
type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M>
|
||||||
|
|
||||||
|
@ -23,4 +23,4 @@ export type MVideoChangeOwnershipFormattable =
|
||||||
Pick<MVideoChangeOwnership, 'id' | 'status' | 'createdAt'> &
|
Pick<MVideoChangeOwnership, 'id' | 'status' | 'createdAt'> &
|
||||||
Use<'Initiator', MAccountFormattable> &
|
Use<'Initiator', MAccountFormattable> &
|
||||||
Use<'NextOwner', MAccountFormattable> &
|
Use<'NextOwner', MAccountFormattable> &
|
||||||
Use<'Video', Pick<MVideo, 'id' | 'uuid' | 'url' | 'name'>>
|
Use<'Video', MVideoFormattable>
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
import { Account } from '../actors'
|
import { Account } from '../actors'
|
||||||
|
import { Video } from './video.model'
|
||||||
|
|
||||||
export interface VideoChangeOwnership {
|
export interface VideoChangeOwnership {
|
||||||
id: number
|
id: number
|
||||||
status: VideoChangeOwnershipStatus
|
status: VideoChangeOwnershipStatus
|
||||||
initiatorAccount: Account
|
initiatorAccount: Account
|
||||||
nextOwnerAccount: Account
|
nextOwnerAccount: Account
|
||||||
video: {
|
video: Video
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
uuid: string
|
|
||||||
url: string
|
|
||||||
}
|
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue