Files
backend/src/tbank/upcoming-events.dto.ts
T

43 lines
1022 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { MoneyDto } from './portfolio.dto';
export class UpcomingEventDto {
@ApiProperty({ enum: ['coupon', 'dividend', 'maturity', 'offer'] })
type: 'coupon' | 'dividend' | 'maturity' | 'offer';
@ApiProperty({ format: 'date' })
date: string;
@ApiProperty({ enum: ['event', 'registry'] })
dateKind: 'event' | 'registry';
@ApiProperty({ type: String, nullable: true })
figi: string | null;
@ApiProperty({ type: String, nullable: true })
instrumentUid: string | null;
@ApiProperty()
ticker: string;
@ApiProperty()
displayName: string;
@ApiProperty({ type: MoneyDto, nullable: true })
projectedAmount: MoneyDto | null;
}
export class UpcomingEventsDto {
@ApiProperty()
accountId: string;
@ApiProperty({ format: 'date-time' })
calculatedAt: string;
@ApiProperty({ type: UpcomingEventDto, isArray: true })
events: UpcomingEventDto[];
@ApiProperty({ type: MoneyDto, isArray: true })
incomeTotalsByCurrency: MoneyDto[];
}