<?php


namespace App\Model\Crates;


class UploaderNode
{
    /** @var  string */
    protected $cacheKey;

    /** @var  string */
    protected $fileName;

    public function __construct(string $key, string $fileName)
    {
        $this->cacheKey = $key;
        $this->fileName = $fileName;
    }

    public function rename($newName) : UploaderNode
    {
        $this->fileName = $newName;

        return $this;
    }

    /**
     * @return string
     */
    public function getFileName() : string
    {
        return $this->fileName;
    }

    /**
     * @return string
     */
    public function getCacheKey() : string
    {
        return $this->cacheKey;
    }

}