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
@@ -31,20 +31,22 @@ export class Position {
@Index()
userId: number;
@ApiProperty({
description: '券商ID',
@ApiPropertyOptional({
description: '券商ID(可选)',
example: 1,
})
@Column({
name: 'broker_id',
type: 'bigint',
nullable: true,
transformer: {
to: (value: number) => value,
from: (value: string) => (value ? parseInt(value, 10) : null),
to: (value: number | null | undefined) => value ?? null,
from: (value: string | null) =>
value ? parseInt(value, 10) : null,
},
})
@Index()
brokerId: number;
brokerId?: number;
@ApiProperty({
description: '资产类型',