<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Http;

use App\Models\Service;
use App\Http\Controllers\Supply;

class ServicesInit extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'services:init';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Generate inital services';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

	
	public function handle() {
		$this->youtube();
		$this->tiktok();
		$this->instagram();
		$this->twitter();
    }

	protected function youtube() {
    	$s = new Service;
		$s->name = 'Unique Views';
		$s->type = 'views';
		$s->site = 'youtube';
		$s->maximum = 500000;
		$s->minimum = 1000;
		$s->price = 750;
		$s->available = true;
		$s->save();

		$sup = Supply::smmworld( $s->id, 418);
		$s->primary_supplier = $sup->id;
		$s->save();

		/*
    	$s = new Service;
		$s->name = 'Language Targeted Views';
		$s->type = 'views';
		$s->site = 'youtube';
		$s->modifier = 'language';
		$s->maximum = 100000;
		$s->minimum = 1000;
		$s->price = 600;
		$s->available = true;
		$s->note = '{language: {
		french: 2974, spanish: 2975, german: 2976, 
		}}';
		$s->save();

    	$s = new Service;
		$s->name = 'Location Targeted Views';
		$s->site = 'youtube';
		$s->modifier = 'location';
		$s->maximum = 100000;
		$s->minimum = 1000;
		$s->price = 650;
		$s->note = '{locations: {
		india: 2600, brazil: 2597, colombia: 2608, philippines: 2609, mexico:
		2673, netherlands: 2771, russia: 2772, spain: 2773, hongkong: 3065,
		israel: 3119, }}';
		$s->available = true;
		$s->description = 'Real impressionss and profile visits';
		$s->save();
		 */

    	$s = new Service;
		$s->name = 'Likes';
		$s->site = 'youtube';
		$s->maximum = 100000;
		$s->minimum = 50;
		$s->price = 850;
		$s->available = true;
		$s->save();

		$sup = Supply::smmworld($s->id, 385);
		$s->primary_supplier = $sup->id;
		$s->save();

    	$s = new Service;
		$s->name = 'Comments';
		$s->site = 'youtube';
		$s->maximum = 500000;
		$s->minimum = 10;
		$s->price = 7500;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 3726);
		$s->primary_supplier = $sup->id;
		$s->save();

	}

	protected function instagram() {

    	$s = new Service;
		$s->name = 'Likes with Profile Visits';
		$s->type = 'likes';
		$s->site = 'instagram';
		$s->maximum = 500000;
		$s->minimum = 1000;
		$s->price = 700;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 2997);
		$s->primary_supplier = $sup->id;
		$s->save();

    	$s = new Service;
		$s->name = 'Likes';
		$s->type = 'likes';
		$s->site = 'instagram';
		$s->maximum = 50000;
		$s->minimum = 100;
		$s->price = 50;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 3775);
		$s->primary_supplier = $sup->id;
		$s->save();

    	$s = new Service;
		$s->name = 'Post Impressions';
		$s->type = 'impressions';
		$s->site = 'instagram';
		$s->maximum = 1000000;
		$s->minimum = 100;
		$s->price = 100;
		$s->available = true;
		$s->description = 'Post impressions and visits';
		$s->save();

		$sup = Supply::smmkings($s->id, 618);
		$s->primary_supplier = $sup->id;
		$s->save();

    	$s = new Service;
		$s->name = 'Profile Visits';
		$s->type = 'profile';
		$s->site = 'instagram';
		$s->maximum = 500000;
		$s->minimum = 100;
		$s->price = 100;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 2997);
		$s->primary_supplier = $sup->id;
		$s->save();

    	$s = new Service;
		$s->name = 'Post Views';
		$s->type = 'views';
		$s->site = 'instagram';
		$s->maximum = 10000000;
		$s->minimum = 100;
		$s->price = 50;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 2840);
		$s->primary_supplier = $sup->id;
		$s->save();

    	$s = new Service;
		$s->name = 'Followers';
		$s->type = 'followers';
		$s->site = 'instagram';
		$s->maximum = 100000;
		$s->minimum = 10;
		$s->price = 410;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 3882);
		$s->primary_supplier = $sup->id;
		$s->save();

	}

	protected function twitter() {
    	$s = new Service;
		$s->name = 'Video Views';
		$s->type = 'views';
		$s->site = 'twitter';
		$s->maximum = 1000000;
		$s->minimum = 100;
		$s->price = 90;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 287);
		$s->primary_supplier = $sup->id;
		$s->save();

    	$s = new Service;
		$s->name = 'Impressions';
		$s->type = 'impressions';
		$s->site = 'twitter';
		$s->maximum = 1000000;
		$s->minimum = 100;
		$s->price = 700;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 288);
		$s->primary_supplier = $sup->id;
		$s->save();

    	$s = new Service;
		$s->name = 'Followers';
		$s->type = 'followers';
		$s->site = 'twitter';
		$s->maximum = 10000;
		$s->minimum = 10;
		$s->price = 600;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 3820);
		$s->primary_supplier = $sup->id;
		$s->save();

	}


	protected function tiktok() {
    	$s = new Service;
		$s->name = 'Views';
		$s->type = 'views';
		$s->site = 'tiktok';
		$s->maximum = 10000000;
		$s->minimum = 100;
		$s->price = 70;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 3826);
		$s->primary_supplier = $sup->id;
		$s->save();

    	$s = new Service;
		$s->name = 'Likes';
		$s->type = 'likes';
		$s->site = 'tiktok';
		$s->maximum = 100000;
		$s->minimum = 100;
		$s->price = 400;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 3935);
		$s->primary_supplier = $sup->id;
		$s->save();

    	$s = new Service;
		$s->name = 'Followers';
		$s->type = 'followers';
		$s->site = 'tiktok';
		$s->maximum = 100000;
		$s->minimum = 20;
		$s->price = 300;
		$s->available = true;
		$s->save();

		$sup = Supply::smmkings($s->id, 3934);
		$s->primary_supplier = $sup->id;
		$s->save();

	}

}

