import { IsString, IsOptional, IsEnum, IsArray } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { ChainTypeEnum } from '@/domain/enums';

export class QueryBalanceDto {
  @ApiProperty({ description: '钱包地址', example: '0x1234...' })
  @IsString()
  address: string;

  @ApiPropertyOptional({
    description: '链类型',
    enum: ChainTypeEnum,
    example: ChainTypeEnum.KAVA,
  })
  @IsOptional()
  @IsEnum(ChainTypeEnum)
  chainType?: ChainTypeEnum;
}

export class QueryMultiChainBalanceDto {
  @ApiProperty({ description: '钱包地址', example: '0x1234...' })
  @IsString()
  address: string;

  @ApiPropertyOptional({
    description: '链类型列表',
    type: [String],
    enum: ChainTypeEnum,
  })
  @IsOptional()
  @IsArray()
  @IsEnum(ChainTypeEnum, { each: true })
  chainTypes?: ChainTypeEnum[];
}
