/**
 * DTO used to remove an attachment from a record.
 *
 * This DTO provides enough information to:
 * - Identify the parent record
 * - Locate the specific attachment entry
 * - Remove both database reference and physical file (if required)
 */
import { IsNumber, IsString } from 'class-validator';

export class RemoveAttachmentDto {
  /**
   * Parent entity identifier.
   *
   * Represents the record from which
   * the attachment should be removed.
   */
  @IsString()
  id: string;

  /**
   * Attachment row identifier.
   *
   * Used to uniquely identify the attachment
   * record in the attachments table.
   */
  @IsNumber()
  row_id: number;

  /**
   * Attachment file name.
   *
   * Typically used to:
   * - Match the stored file record
   * - Remove the physical file from storage
   */
  @IsString()
  file_name: string;

  /**
   * Attachment file URL.
   *
   * Represents the storage path or public URL
   * of the file to be deleted.
   */
  @IsString()
  file_url: string;
}
