feat: 更新持仓

This commit is contained in:
R524809
2026-01-16 18:01:41 +08:00
parent b7972153cc
commit aa313b7605
16 changed files with 1757 additions and 39 deletions
@@ -0,0 +1,47 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNotEmpty, IsOptional, MaxLength } from 'class-validator';
export class SearchAssetDto {
@ApiProperty({
description: '搜索关键词(股票代码或名称)',
example: '600519',
maxLength: 50,
})
@IsString()
@IsNotEmpty()
@MaxLength(50)
keyword: string;
@ApiProperty({
description: '资产类型过滤(可选)',
example: 'stock',
enum: ['stock', 'fund', 'bond'],
required: false,
})
@IsOptional()
@IsString()
assetType?: string;
@ApiProperty({
description: '返回结果数量限制',
example: 10,
default: 10,
required: false,
})
@IsOptional()
limit?: number;
}
export class AssetSearchResult {
@ApiProperty({ description: '股票代码', example: '600519' })
symbol: string;
@ApiProperty({ description: '股票名称', example: '贵州茅台' })
name: string;
@ApiProperty({ description: '市场代码', example: 'sh' })
market: string;
@ApiProperty({ description: '资产类型', example: 'stock' })
assetType: string;
}