import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import {
  IsString,
  IsNotEmpty,
  IsOptional,
  IsMongoId,
  IsDateString,
} from "class-validator";

export class CreateUserSubscriptionDto {
  @ApiProperty({
    example: "com.example.premium.monthly",
    description: "Product ID from app store",
  })
  @IsNotEmpty({ message: "Product ID is required" })
  @IsString({ message: "Product ID must be a string" })
  productId: string;

  @ApiProperty({
    example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    description: "Purchase token from Apple/Google",
  })
  @IsNotEmpty({ message: "Purchase token is required" })
  @IsString({ message: "Purchase token must be a string" })
  transactionId: string;

  @IsNotEmpty({ message: "Device type is required" })
  @IsString({ message: "Device type must be a string" })
  deviceType: string; // "ios" or "android"

}
