<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\Product;
use Illuminate\Support\Str;

class ProductSeeder extends Seeder
{
    public function run(): void
    {
        $products = [
            [
                'name' => 'Empal Gentong Kaleng',
                'slug' => Str::slug('Empal Gentong Kaleng'),
                'price' => 45000,
                'weight' => 350, // gram
                'stock' => 100,
                'image' => 'empal_gentong.jpg',
            ],
            [
                'name' => 'Empal Asem Kaleng',
                'slug' => Str::slug('Empal Asem Kaleng'),
                'price' => 45000,
                'weight' => 350, // gram
                'stock' => 85,
                'image' => 'empal_asem.jpg',
            ],
            [
                'name' => 'Bumbu Empal Gentong',
                'slug' => Str::slug('Bumbu Empal Gentong'),
                'price' => 25000,
                'weight' => 150, // gram
                'stock' => 200,
                'image' => 'bumbu_empal.jpg',
            ]
        ];

        foreach ($products as $product) {
            Product::create($product);
        }
    }
}