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.
34 lines
844 B
34 lines
844 B
import {
|
|
CreateAccountWithBalancesDto,
|
|
CreateAssetProfileWithMarketDataDto,
|
|
CreateOrderDto,
|
|
CreateTagDto
|
|
} from '@ghostfolio/common/dtos';
|
|
|
|
import { Type } from 'class-transformer';
|
|
import { IsArray, IsOptional, ValidateNested } from 'class-validator';
|
|
|
|
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[];
|
|
|
|
@IsArray()
|
|
@IsOptional()
|
|
@Type(() => CreateTagDto)
|
|
@ValidateNested({ each: true })
|
|
tags?: CreateTagDto[];
|
|
}
|
|
|