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

/**
 * DTO for updating the "received" status of a commission or record.
 * This DTO is used when marking a particular record as received or not.
 */
export class UpdateReceivedStatusDto {
  /**
   * The unique identifier of the record whose status is being updated.
   * Example: '12345'
   */
  @ApiProperty({
    description: 'Unique identifier of the record to update',
    example: '12345',
  })
  @IsNotEmpty({ message: 'id is required' })
  @IsString({ message: 'id must be a string' })
  id: string;

  /**
   * Status indicating whether the record has been received.
   * Expected values could be 'yes', 'no', 'true', 'false', etc.
   * Example: 'yes'
   */
  @ApiProperty({
    description: 'Received status of the record',
    example: 'yes',
  })
  @IsNotEmpty({ message: 'received is required' })
  @IsString({ message: 'received must be a string' })
  received: string;
}
