import { IsNumber, IsString } from 'class-validator';

/**
 * DTO used to remove an attachment from a record.
 *
 * Contains the minimum information required to
 * identify and safely delete the attachment entry.
 */
export class RemoveAttachmentDto {
  /**
   * Primary identifier of the parent entity
   * (e.g., bonus ID, commission ID, case ID).
   */
  @IsString()
  id: string;

  /**
   * Database row ID of the attachment record.
   * Used to precisely identify the attachment entry.
   */
  @IsNumber()
  row_id: number;

  /**
   * Name of the file to be removed.
   * Typically used for file system cleanup.
   */
  @IsString()
  file_name: string;

  /**
   * Public or storage URL of the attachment file.
   * Used to locate and delete the file from storage.
   */
  @IsString()
  file_url: string;
}
