<?php

namespace Database\Seeders;

use App\Models\Order;
use App\Models\OrderProduct;
use Illuminate\Database\Seeder;

class OrderProductSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        foreach (Order::all() as $order) {
            OrderProduct::factory(rand(1, 3), ['order_id' => $order->id])->create();
        }
    }
}
