mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
838 B
26 lines
838 B
import { CreateOrderDto } from '@ghostfolio/api/app/order/create-order.dto';
|
|
|
|
import { Type } from 'class-transformer';
|
|
import { IsArray, IsOptional, ValidateNested } from 'class-validator';
|
|
|
|
import { CreateAccountWithBalancesDto } from './create-account-with-balances.dto';
|
|
import { CreateAssetProfileWithMarketDataDto } from './create-asset-profile-with-maketdata.dto';
|
|
|
|
export class ImportDataDto {
|
|
@IsArray()
|
|
@IsOptional()
|
|
@Type(() => CreateAccountWithBalancesDto)
|
|
@ValidateNested({ each: true })
|
|
accounts?: CreateAccountWithBalancesDto[];
|
|
|
|
@IsArray()
|
|
@Type(() => CreateOrderDto)
|
|
@ValidateNested({ each: true })
|
|
activities: CreateOrderDto[];
|
|
|
|
@IsArray()
|
|
@IsOptional()
|
|
@Type(() => CreateAssetProfileWithMarketDataDto)
|
|
@ValidateNested({ each: true })
|
|
assetProfiles?: CreateAssetProfileWithMarketDataDto[];
|
|
}
|
|
|