import { ApiProperty } from '@nestjs/swagger';

export class WalletAddressDto {
  @ApiProperty()
  chainType: string;

  @ApiProperty()
  address: string;
}

export class KycInfoDto {
  @ApiProperty()
  realName: string;

  @ApiProperty()
  idCardNumber: string;
}

export class UserProfileDto {
  @ApiProperty()
  userId: string;

  @ApiProperty({
    example: 'D2512110001',
    description: '账户序列号 (格式: D + YYMMDD + 5位序号)',
  })
  accountSequence: string;

  @ApiProperty({ nullable: true })
  phoneNumber: string | null;

  @ApiProperty()
  nickname: string;

  @ApiProperty({ nullable: true })
  avatarUrl: string | null;

  @ApiProperty()
  referralCode: string;

  @ApiProperty({ type: [WalletAddressDto] })
  walletAddresses: WalletAddressDto[];

  @ApiProperty()
  kycStatus: string;

  @ApiProperty({ type: KycInfoDto, nullable: true })
  kycInfo: KycInfoDto | null;

  @ApiProperty()
  status: string;

  @ApiProperty()
  registeredAt: Date;

  @ApiProperty({ nullable: true })
  lastLoginAt: Date | null;
}

// 导出别名以兼容其他命名方式
export { UserProfileDto as UserProfileResponseDto };
