<?php

namespace App\Modules\Inventory\DTOs;

final class WarehouseWriteData
{
    public function __construct(
        public readonly string $name,
    ) {}

    /**
     * @param  array<string, mixed>  $validated
     */
    public static function fromValidated(array $validated): self
    {
        return new self(
            name: (string) $validated['name'],
        );
    }
}
