<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\SalesType;

class SalesTypeSeeder extends Seeder
{
    public function run()
    {
        $types = [
            ['name' => 'Dine In', 'description' => 'Customer dining in the restaurant'],
            ['name' => 'Take Away', 'description' => 'Customer taking food to go'],
            ['name' => 'Delivery', 'description' => 'Food delivery service'],
            ['name' => 'Online Order', 'description' => 'Orders placed through online platforms'],
        ];

        foreach ($types as $type) {
            SalesType::firstOrCreate(
                ['name' => $type['name']],
                array_merge($type, [
                    'is_active' => true,
                    'created_by' => 1,
                ])
            );
        }
    }
}