<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\ProductWarehouse;

class ProductWarehousesTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        /**
         * Reset the ProductWarehouse table
         */
        // if (\App::environment('local')) {
        //     ProductWarehouse::truncate();
        // }

        $group = [
                'name'         => 'N/A',
                'code'         => 'N/A',
                'company_id'   => '1',
                'priority'     => '1',
                'status'       => '1',
                'is_default'   => '1',
            ];

        ProductWarehouse::firstOrCreate(['code' => 'N/A'],$group);
    }
}
