import { ApiProperty } from '@nestjs/swagger'; import { PositionWithPriceDto } from './position-with-price.dto'; export class PortfolioSummaryDto { @ApiProperty() totalInvested!: number; @ApiProperty() totalValue!: number; @ApiProperty() totalPnl!: number; @ApiProperty({ type: Number, nullable: true }) totalPnlPercent!: number | null; @ApiProperty() totalDividends!: number; @ApiProperty() totalReturn!: number; @ApiProperty({ type: Number, nullable: true }) totalReturnPercent!: number | null; @ApiProperty() positionCount!: number; @ApiProperty({ type: Number, nullable: true }) weightedYield!: number | null; } export class AnalyticsResponseDto { @ApiProperty({ type: [PositionWithPriceDto] }) positions!: PositionWithPriceDto[]; @ApiProperty() summary!: PortfolioSummaryDto; }