<?php

namespace App\Models;

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

class ReportDataUsoDelCascoOmologazione extends Model
{
    use HasFactory;

    //protected $primaryKey = 'progressive';
public $timestamps = false;
    protected $table = 'fcf_reports_report_data_uso_del_casco_omologazione';

    protected $fillable = [
        'report_id',
        'progressive',
        'conducente' ,
        'passeggeri'

    ];

    public function report(){
        return $this->belongsTo(Report::class, 'report_id');
    }

    public function scopeByProgressive($query, $progressive){
        return $query->where('progressive', $progressive);
    }

}
