import { IsString, IsNumber, IsOptional, IsArray, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
class CartItemDto {
@IsString() productId: string;
@IsString() productName: string;
@IsString() @IsOptional() productImage?: string;
@IsNumber() price: number;
@IsNumber() quantity: number;
}
export class CreatePaymentIntentDto {
@IsArray() @ValidateNested({ each: true }) @Type(() => CartItemDto) items: CartItemDto[];
@IsString() paymentMethod: string;
@IsString() @IsOptional() currency?: string;
@IsString() @IsOptional() giftCardCode?: string;
}