<?php

namespace Database\Seeders;

use App\Enums\Status;
use App\Models\DeliveryDays;
use Illuminate\Database\Seeder;
use Dipokhalder\EnvEditor\EnvEditor;

class DeliveryDaysTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $envService = new EnvEditor();
        if ($envService->getValue('DEMO')) {
            DeliveryDays::insert([
                [
                    'number_of_days' => '7',
                    'status'         => Status::ACTIVE,
                    'created_at'     => now(),
                    'updated_at'     => now()
                ],
                [
                    'number_of_days' => '15',
                    'status'         => Status::ACTIVE,
                    'created_at'     => now(),
                    'updated_at'     => now()
                ],
                [
                    'number_of_days' => '30',
                    'status'         => Status::ACTIVE,
                    'created_at'     => now(),
                    'updated_at'     => now()
                ],
            ]);
        }
    }
}