<?php

namespace App\Models;

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

class FaceTemplate extends Model
{
    use HasFactory;

    protected $fillable = [
        'employee_id', 'embedding_b64', 'dim', 'model', 'quality', 'version', 'active',
    ];

    protected function casts(): array
    {
        return [
            'active' => 'boolean',
            'quality' => 'float',
        ];
    }

    public function employee()
    {
        return $this->belongsTo(Employee::class);
    }
}
