<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\OrderDeliveryDate;
use Dipokhalder\EnvEditor\EnvEditor;

class OrderDeliveryDateSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $envService = new EnvEditor();
        if ($envService->getValue('DEMO')) {
            OrderDeliveryDate::insert([
                [
                    'order_id'   => 1,
                    'date'       => now()->subDays(7)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 1,
                    'date'       => now()->subDays(6)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 1,
                    'date'       => now()->subDays(5)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 1,
                    'date'       => now()->subDays(4)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 1,
                    'date'       => now()->subDays(3)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 1,
                    'date'       => now()->subDays(2)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 1,
                    'date'       => now()->subDays(1)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 2,
                    'date'       => now()->subDays(7)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 2,
                    'date'       => now()->subDays(6)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 2,
                    'date'       => now()->subDays(5)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 2,
                    'date'       => now()->subDays(4)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 2,
                    'date'       => now()->subDays(3)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 2,
                    'date'       => now()->subDays(2)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 2,
                    'date'       => now()->subDays(1)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 3,
                    'date'       => now(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 3,
                    'date'       => now()->addDays(1)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 3,
                    'date'       => now()->addDays(2)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 3,
                    'date'       => now()->addDays(3)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 3,
                    'date'       => now()->addDays(4)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 3,
                    'date'       => now()->addDays(5)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 3,
                    'date'       => now()->addDays(6)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 4,
                    'date'       => now()->subDays(7)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 4,
                    'date'       => now()->subDays(6)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 4,
                    'date'       => now()->subDays(5)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 4,
                    'date'       => now()->subDays(4)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 4,
                    'date'       => now()->subDays(3)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 4,
                    'date'       => now()->subDays(2)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 4,
                    'date'       => now()->subDays(1)->toDateTimeString(),
                    'created_at' => now()->subDays(8)->toDateTimeString(),
                    'updated_at' => now()->subDays(8)->toDateTimeString()
                ],
                [
                    'order_id'   => 5,
                    'date'       => now(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 5,
                    'date'       => now()->addDays(1)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 5,
                    'date'       => now()->addDays(2)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 5,
                    'date'       => now()->addDays(3)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 5,
                    'date'       => now()->addDays(4)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 5,
                    'date'       => now()->addDays(5)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 5,
                    'date'       => now()->addDays(6)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 6,
                    'date'       => now(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 6,
                    'date'       => now()->addDays(1)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 6,
                    'date'       => now()->addDays(2)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 6,
                    'date'       => now()->addDays(3)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 6,
                    'date'       => now()->addDays(4)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 6,
                    'date'       => now()->addDays(5)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],
                [
                    'order_id'   => 6,
                    'date'       => now()->addDays(6)->toDateTimeString(),
                    'created_at' => now()->subDays(1)->toDateTimeString(),
                    'updated_at' => now()->subDays(1)->toDateTimeString()
                ],

            ]);
        }
    }
}