<?php

namespace Database\Seeders;

use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Hash;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        User::factory()->create([
            'name' => 'admin',
            'email' => 'admin@example.com',
            'password' => Hash::make('admin123')
        ]);
        User::factory(10)->create();

        DB::table('foods')->insert([
            // Makanan
            [
                'name' => 'Nasi Goreng Spesial',
                'price' => 20000,
                'image_url' => 'https://source.unsplash.com/featured/?nasi-goreng',
                'type' => 'food',
            ],
            [
                'name' => 'Mie Ayam Bakso',
                'price' => 18000,
                'image_url' => 'https://source.unsplash.com/featured/?mie-ayam',
                'type' => 'food',
            ],
            [
                'name' => 'Sate Ayam Madura',
                'price' => 22000,
                'image_url' => 'https://source.unsplash.com/featured/?sate',
                'type' => 'food',
            ],
            [
                'name' => 'Ayam Geprek Keju',
                'price' => 25000,
                'image_url' => 'https://source.unsplash.com/featured/?ayam-geprek',
                'type' => 'food',
            ],

            // Minuman
            [
                'name' => 'Es Teh Manis',
                'price' => 5000,
                'image_url' => 'https://source.unsplash.com/featured/?iced-tea',
                'type' => 'beverage',
            ],
            [
                'name' => 'Jus Alpukat',
                'price' => 12000,
                'image_url' => 'https://source.unsplash.com/featured/?avocado-juice',
                'type' => 'beverage',
            ],
            [
                'name' => 'Kopi Susu Gula Aren',
                'price' => 15000,
                'image_url' => 'https://source.unsplash.com/featured/?coffee',
                'type' => 'beverage',
            ],
            [
                'name' => 'Air Mineral',
                'price' => 4000,
                'image_url' => 'https://source.unsplash.com/featured/?mineral-water',
                'type' => 'beverage',
            ],
        ]);

    }
}
