<?php

namespace App\Models;

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

class Polizza extends Model
{
    use HasFactory;

public $timestamps = false;
    protected $table = 'fcf_reports_polizzas';

    protected $fillable = [
        'compagnia_id',
        'agenzia',
        'polizza_num',
        'valida_dal',
        'valida_al' ,
        'anagrafica_id',
        'state',
        'created',
        'created_by',
        'updated',
        'updated_by',
        'locked' ,
        'locked_by',
    ];

    public function compagnia()
    {
        return $this->belongsTo(\App\Models\Compagnia::class, 'compagnia_id', 'id');
    }

    public function anagrafica()
    {
        return $this->belongsTo(\App\Models\Anagrafica::class, 'anagrafica_id', 'id');
    }

}
