<?php

namespace Database\Seeders;

use App\Models\Purchase;
use App\Models\Supplier;
use App\Models\User;
use Illuminate\Database\Seeder;

class PurchaseSeeder extends Seeder
{
    public function run(): void
    {
        $supplier = Supplier::query()->first();
        $user = User::query()->first();

        Purchase::factory()
            ->count(3)
            ->create([
                'supplier_id' => $supplier?->id,
                'created_by_id' => $user?->id,
            ]);
    }
}
