import { IsNotEmpty, IsNumber, IsString, IsEnum, Min } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
import { ChainType } from '@/domain/value-objects';

export class HandleDepositDTO {
  @ApiProperty({ description: '账户序列号 (跨服务关联标识)' })
  @IsNotEmpty()
  @IsString()
  accountSequence: string;

  @ApiProperty({ description: '用户ID' })
  @IsNotEmpty()
  @IsString()
  userId: string;

  @ApiProperty({ description: '充值金额', minimum: 0 })
  @IsNumber()
  @Min(0)
  amount: number;

  @ApiProperty({ description: '链类型', enum: ChainType })
  @IsEnum(ChainType)
  chainType: ChainType;

  @ApiProperty({ description: '交易哈希' })
  @IsNotEmpty()
  @IsString()
  txHash: string;
}
