import { IsString, IsNotEmpty, IsEnum, IsOptional } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { Platform } from '@prisma/client';

export class RegisterPushTokenDto {
  @ApiProperty({
    description: 'FCM or APNs push token',
    example: 'dGVzdC10b2tlbi1mb3ItcHVzaC1ub3RpZmljYXRpb25z',
  })
  @IsString()
  @IsNotEmpty()
  token: string;

  @ApiProperty({
    description: 'Device platform',
    enum: Platform,
    example: Platform.IOS,
  })
  @IsEnum(Platform)
  platform: Platform;

  @ApiPropertyOptional({
    description: 'Unique device identifier for token management',
    example: 'device-abc-123',
  })
  @IsString()
  @IsOptional()
  deviceId?: string;
}
