<?php

require __DIR__ . '/vendor/autoload.php';

use App\Models\Notification;

$app = require_once __DIR__ . '/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();

try {
    $notification = Notification::create([
        'user_id' => 1,
        'type' => 'system_updates',
        'title' => 'Admin Notification System Ready! 🎉',
        'message' => 'You can now send notifications to all users from the admin panel /notifications page. Try sending your first notification!',
        'priority' => 'high',
        'action_url' => '/notifications',
        'is_read' => false,
    ]);
    
    echo "✓ Created admin notification ID: {$notification->id}\n";
    echo "Title: {$notification->title}\n";
    echo "Priority: {$notification->priority}\n";
    
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
    exit(1);
}
