import { ApiProperty } from '@nestjs/swagger'; import { MoneyDto } from '../common/money.dto'; export class PortfolioSummaryDto { @ApiProperty({ type: MoneyDto, isArray: true }) declare totalsByCurrency: MoneyDto[]; @ApiProperty({ type: 'integer', minimum: 0, description: 'Number of non-zero stock positions, not the number of units.', }) declare stockPositionCount: number; @ApiProperty({ type: 'integer', minimum: 0, description: 'Number of non-zero bond positions, not the number of units.', }) declare bondPositionCount: number; } export class BrokerageAccountDto { @ApiProperty() declare id: string; @ApiProperty() declare name: string; @ApiProperty({ enum: [ 'BROKERAGE', 'INDIVIDUAL_INVESTMENT', 'INVEST_BOX', 'MONEY_MARKET_FUND', ], }) declare type: 'BROKERAGE' | 'INDIVIDUAL_INVESTMENT' | 'INVEST_BOX' | 'MONEY_MARKET_FUND'; @ApiProperty({ type: String, nullable: true, format: 'date' }) declare openedOn: string | null; @ApiProperty({ type: PortfolioSummaryDto, nullable: true }) portfolioSummary?: PortfolioSummaryDto | null; }