<?php

namespace Database\Seeders;

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

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

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

        ProductAttributeType::firstOrCreate(['code' => 'GENERAL'], $types);
    }
}
