<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class PushSubscriber extends Model
{
    use HasFactory;

    /**
     * @var array<int, string>
     */
    protected $fillable = [
        'user_id',
        'endpoint',
        'endpoint_hash',
        'key_p256dh',
        'key_auth',
        'locale',
        'last_prompted_at',
        'denied_until',
        'is_active',
        'ip_address',
        'user_agent',
    ];

    /**
     * @var array<string, string>
     */
    protected $casts = [
        'last_prompted_at' => 'datetime',
        'denied_until' => 'datetime',
        'is_active' => 'boolean',
    ];
}
