<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Scan extends Model
{
    protected $table = "scans";
    public $timestamps = false;
    protected $fillable = [
        "tag_id", "lat", "lng", "location_shared", "scanner_phone",
        "alert_sent", "fingerprint",
    ];
    protected $casts = ["location_shared" => "boolean", "alert_sent" => "boolean"];

    public function tag(): BelongsTo { return $this->belongsTo(Tag::class, "tag_id"); }
}
