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

/** Proof of delivery captured when import goods are handed over to the customer. */
export class DeliverInventoryDto {
  @ApiProperty({ description: 'Name of the person who received the goods' })
  @IsString()
  receiverName!: string;

  @ApiPropertyOptional({ description: 'When the goods were delivered (defaults to now)' })
  @IsOptional()
  @IsDateString()
  deliveredAt?: string;

  @ApiPropertyOptional({ description: 'Delivery remarks / notes' })
  @IsOptional()
  @IsString()
  remarks?: string;

  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  performedBy?: string;
}
