<?php

namespace App\Console\Commands;
 
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use App\ShopifyStore;
use App\Helpers\AppHelper;
use Artisan;
use App\Http\Controllers\ListingController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class ImportEbayProducts extends Command{
	protected $signature = 'importebayproducts:run';
	protected $description = 'Import Ebay Products';
	
	public function __construct(){
		parent::__construct();
	}

	public function handle(){
		$cronJob = AppHelper::getCronJob("import_account_products");
		if(!$cronJob || $cronJob->flag == 1 || $cronJob->do_stop == 1) die();

		$ListingController = new ListingController();
		$ListingController->importEbayProducts();
	}
}