<?php declare(strict_types=1);

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

final class Captcha extends Model
{
    use HasFactory;

    protected $table = 'captchas';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'uuid',
    ];

    /**
     * The attributes that should be hidden for serialization.
     *
     * @var array<int, string>
     */
    protected $hidden = [
        'uuid',
    ];

    public function captchaLogs(): HasMany
    {
        return $this->hasMany(CaptchaLog::class);
    }

    public function captchaToken(): BelongsTo
    {
        return $this->belongsTo(CaptchaToken::class);
    }
}
