<?php

namespace App\Models;

use App\Traits\HasTableName;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;

class Contact extends Model
{
    use HasTableName;

    protected $guarded = [
        'id',
    ];

    #[Scope]
    protected function unanswered(Builder $builder): void
    {
        $builder->where('answered', false);
    }
}
