feat: 更新持仓
This commit is contained in:
@@ -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: '资产类型',
|
||||
|
||||
Reference in New Issue
Block a user