<?php

namespace Database\Seeders;

use App\Models\ShopUser;
use App\Models\UnlockOrder;
use App\Models\ShopPayment;
use Illuminate\Database\Seeder;

class UnlockServiceSeeder extends Seeder
{
    public function run(): void
    {
        // Create 5 demo shop users
        $shops = ShopUser::factory(5)->create();

        // Create orders and payments for each shop
        foreach ($shops as $shop) {
            // Create 3-5 orders per shop
            UnlockOrder::factory(rand(3, 5))->create([
                'shop_user_id' => $shop->id,
            ]);

            // Create 1-2 payments per shop
            ShopPayment::factory(rand(1, 2))->create([
                'shop_user_id' => $shop->id,
            ]);
        }
    }
}
