moex-vibe/apps/backend/src/modules/portfolio/dto/update-portfolio.dto.ts
Sergey Krylov a980520261
Some checks failed
CI / lint (pull_request) Successful in 1m59s
CI / test (pull_request) Successful in 1m45s
CI / build (pull_request) Failing after 1m54s
CI / lint (push) Successful in 1m50s
CI / test (push) Successful in 1m47s
CI / build (push) Failing after 2m3s
feat: portfolio management with share/bond separation
- Add Portfolio + Position models (Prisma + migrations)
- Backend: PortfolioModule with CRUD, enrichment, type detection
- Backend: enrichBondPosition returns 13 financial fields (YTM, duration,
  coupon, NCD, accrued interest, bid/offer, bondType, offerDate, etc.)
- Frontend: portfolio pages, 4 TanStack Query hooks, split share/bond tables
- Fix: MOEX bond marketdata board fallback (TQCB → TQOB for OFZ)
- Frontend: clickable ticker links to /stocks/:secid and /bonds/:secid
- Remove: target allocation, deviation, tags display from Phase 1
- Docs: ADR-009 (domain model), ADR-010 (price computation),
  portfolio backend doc, superpowers spec + plan
2026-06-14 11:14:04 +03:00

26 lines
678 B
TypeScript

import { IsString, IsOptional, IsIn, MaxLength, MinLength } from 'class-validator';
import { ApiPropertyOptional } from '@nestjs/swagger';
const CURRENCIES = ['RUB', 'USD', 'EUR', 'CNY', 'KZT', 'BYN'] as const;
export class UpdatePortfolioDto {
@ApiPropertyOptional({ example: 'Мой портфель' })
@IsString()
@MinLength(1)
@MaxLength(100)
@IsOptional()
name?: string;
@ApiPropertyOptional({ example: 'Обновлённое описание' })
@IsString()
@IsOptional()
@MaxLength(500)
description?: string;
@ApiPropertyOptional({ default: 'RUB', enum: CURRENCIES })
@IsString()
@IsIn(CURRENCIES)
@IsOptional()
currency?: string;
}