<?php

namespace App\Models;

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

class ReportDataCintureSicurezza extends Model
{
    use HasFactory;

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

    protected $fillable = [
        'report_id',
        'progressive',
        'conducente',
        'passeggeri_0',
        'passeggeri_1',
        'passeggeri_2',
        'passeggeri_3'
    ];

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

}
