<?php

namespace Database\Seeders;

use Carbon\Carbon;
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'     => Carbon::now(),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 1,
                    'date'     => Carbon::now()->addDays(2),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 1,
                    'date'     => Carbon::now()->addDays(4),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                
                [
                    'order_id' => 2,
                    'date'     => Carbon::now(),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(1),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(2),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(3),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(4),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(7),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(8),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(9),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(10),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(11),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(14),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(15),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(16),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(17),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 2,
                    'date'     => Carbon::now()->addDays(18),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 4,
                    'date'     => Carbon::now(),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 4,
                    'date'     => Carbon::now()->addDays(1),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 4,
                    'date'     => Carbon::now()->addDays(2),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 4,
                    'date'     => Carbon::now()->addDays(6),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 4,
                    'date'     => Carbon::now()->addDays(7),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 4,
                    'date'     => Carbon::now()->addDays(8),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                [
                    'order_id' => 4,
                    'date'     => Carbon::now()->addDays(9),
                    'created_at'           => now(),
                    'updated_at'           => now()
                ],
                
            ]);
        }
    }
}
