Your IP : 216.73.216.97


Current Path : /var/www/clients/client3/web2/web/vendor/m2epro/magento2-extension.disabled/Model/
Upload File :
Current File : /var/www/clients/client3/web2/web/vendor/m2epro/magento2-extension.disabled/Model/Processing.php

<?php

/**
 * @author     M2E Pro Developers Team
 * @copyright  M2E LTD
 * @license    Commercial use is forbidden
 */

namespace Ess\M2ePro\Model;

class Processing extends \Ess\M2ePro\Model\ActiveRecord\AbstractModel
{
    public const TYPE_SINGLE = 1;
    public const TYPE_PARTIAL = 2;

    //####################################

    public function _construct()
    {
        parent::_construct();
        $this->_init(\Ess\M2ePro\Model\ResourceModel\Processing::class);
    }

    //####################################

    public function getModel()
    {
        return $this->getData('model');
    }

    public function getParams()
    {
        return $this->getSettings('params');
    }

    public function getResultData()
    {
        return $this->getSettings('result_data');
    }

    public function getResultMessages()
    {
        return $this->getSettings('result_messages');
    }

    public function isCompleted()
    {
        return (bool)$this->getData('is_completed');
    }

    public function forceRemove()
    {
        $tableName = $this->getHelper('Module_Database_Structure')->getTableNameWithPrefix('m2epro_processing_lock');
        $this->getResource()->getConnection()->delete($tableName, ['`processing_id` = ?' => (int)$this->getId()]);

        $tableName = $this->getHelper('Module_Database_Structure')->getTableNameWithPrefix('m2epro_processing');
        $this->getResource()->getConnection()->delete($tableName, ['`id` = ?' => (int)$this->getId()]);
    }

    //####################################
}