<?php

namespace Database\Seeders;

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

class productTypeSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        // Ropa, Calzado, Alimento, suplementos, accesorios, etc.
        $categories = [
            ['category_name' => 'Ropa', 'is_active' => true],
            ['category_name' => 'Calzado', 'is_active' => true],
            ['category_name' => 'Alimento', 'is_active' => true],
            ['category_name' => 'Suplementos', 'is_active' => true],
            ['category_name' => 'Accesorios', 'is_active' => true],
        ];

        foreach ($categories as $category) {
            Product_category::updateOrCreate(
            ['category_name' => $category['category_name']],
            ['is_active' => $category['is_active']]
            );
        }
    }
}
