<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * A single captured value of a stock/backlog metric for one solicitor on one day.
 *
 * Deliberately does NOT use BelongsToSolicitor: rows are written by a console
 * command (where that global scope is disabled) and read back with an explicit
 * solicitor filter, so we keep the solicitor dimension explicit everywhere.
 */
class DailyMetricSnapshot extends Model
{
    protected $fillable = [
        'solicitor_id',
        'captured_on',
        'metric',
        'value',
    ];

    protected $casts = [
        'captured_on' => 'date',
        'value'       => 'integer',
    ];
}
