<?php

namespace auctionforge\inc\model;

use auctionforge\inc\abs\ImageModel;
use auctionforge\inc\helpers\LotHelper;

class LotImage extends ImageModel
{
    /**
     * @var
     */
    protected $lot;

    public function __construct($postId)
    {
        $this->setPostId($postId);
        $this->setLot($postId);
        $this->setPrefixImage();
        $this->setImageCloned($this->getLot()->getOptionValue('lot_imagesCloned', false));

        $this->initImageParams();

        $this->setImageList();
    }

    /**
     * @return LotHelper
     */
    public function getLot()
    {
        return $this->lot;
    }

    /**
     * @param $postId
     * @return void
     */
    public function setLot($postId)
    {
        $this->lot = new LotHelper($postId);
    }
}