import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsObject, IsOptional, IsString } from 'class-validator';
import { SetCarDeliveryDto } from './set-car-delivery.dto';


export class SetAllCartParmsDto {
  @ApiProperty({
    description: 'Cart description or notes',
    required: false,
    example: 'Please deliver to the back door',
  })
  @IsOptional()
  @IsString()
  description?: string;

  @ApiProperty({ description: 'Delivery method ID', example: '01ARZ3NDEKTSV4RRFFQ69G5FAV' })
  @IsNotEmpty()
  @IsString()
  deliveryMethodId!: string;

  @ApiProperty({ description: 'User address ID', example: '01ARZ3NDEKTSV4RRFFQ69G5FAV' })
  @IsOptional()
  @IsString()
  addressId?: string;

  @ApiProperty({ description: 'Payment method ID', example: '01ARZ3NDEKTSV4RRFFQ69G5FAV' })
  @IsNotEmpty()
  @IsString()
  paymentMethodId!: string;

  @ApiProperty({ description: 'Table number for dine-in orders', example: '5', required: false })
  @IsOptional()
  @IsString()
  tableNumber?: string;

  @ApiProperty()
  @IsOptional()
  @IsObject()
  carAddress?: SetCarDeliveryDto;
}
