feat(cc-052): IngestSignalsDto
This commit is contained in:
parent
ebbbff123f
commit
0b2c515fe7
1 changed files with 24 additions and 0 deletions
24
src/financial-intelligence/dto.ts
Normal file
24
src/financial-intelligence/dto.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { IsArray, IsNumber, IsOptional, IsString, ValidateNested } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
export class FinancialSignalItemDto {
|
||||
@IsString() source: string;
|
||||
@IsString() title: string;
|
||||
@IsString() summary: string;
|
||||
@IsOptional() @IsString() category?: string;
|
||||
@IsOptional() @IsString() region?: string;
|
||||
@IsOptional() @IsString() niche?: string;
|
||||
@IsOptional() @IsString() indicatorCode?: string;
|
||||
@IsOptional() @IsNumber() rawValue?: number;
|
||||
@IsOptional() @IsNumber() changePercent?: number;
|
||||
@IsOptional() @IsString() unit?: string;
|
||||
@IsOptional() @IsString() severity?: string;
|
||||
@IsOptional() @IsString() publishedAt?: string;
|
||||
@IsOptional() @IsString() expiresAt?: string;
|
||||
}
|
||||
|
||||
export class IngestSignalsDto {
|
||||
@IsOptional() @IsString() tenantId?: string;
|
||||
@IsArray() @ValidateNested({ each: true }) @Type(() => FinancialSignalItemDto)
|
||||
signals: FinancialSignalItemDto[];
|
||||
}
|
||||
Loading…
Reference in a new issue