<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class BulkOperationsTestSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $tenant = \App\Models\Tenant::first() ?? \App\Models\Tenant::factory()->create();
        $user = \App\Models\User::first() ?? \App\Models\User::factory()->create();

        // Create some policies to test bulk delete
        \App\Models\Policy::factory()->count(30)->create([
            'tenant_id' => $tenant->id,
            'policy_type' => 'deviceConfiguration',
        ]);

        // Create a completed bulk run
        \App\Models\BulkOperationRun::factory()->create([
            'tenant_id' => $tenant->id,
            'user_id' => $user->id,
            'status' => 'completed',
            'total_items' => 10,
            'processed_items' => 10,
            'succeeded' => 10,
        ]);
    }
}
