<?php

namespace Database\Seeders;

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

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

        $brand = [
            'name'       => 'General',
            'code'       => 'GENERAL',
            'type'       => 'Self',
            'priority'   => '1',
            'status'     => '1',
            'is_default' => '1',
        ];

        ProductBrand::firstOrCreate(['code' => 'GENERAL'], $brand);
    }
}
