<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * An editable target for one KPI metric at one granularity (day/week/month).
 *
 * Targets are global (not scoped by solicitor or lead source): one value per
 * metric per granularity, set inline on the KPI report and compared against the
 * live figures.
 */
class KpiTarget extends Model
{
    protected $fillable = [
        'metric_key',
        'granularity',
        'value',
    ];

    protected $casts = [
        'value' => 'float',
    ];
}
