ReportDataPartiCoinvolte.php 824 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. class ReportDataPartiCoinvolte extends Model
  6. {
  7. use HasFactory;
  8. public $timestamps = false;
  9. //protected $primaryKey = ['report_id', 'progressive'];
  10. //public $incrementing = false;
  11. protected $table = 'fcf_reports_report_data_parti_coinvolte';
  12. protected $fillable = [
  13. 'report_id',
  14. 'progressive',
  15. 'conducente_o_pedone',
  16. 'progressive_type' ,
  17. 'anagrafica' ,
  18. 'veicolo'
  19. ];
  20. public function veicolo_data()
  21. {
  22. return $this->belongsTo(\App\Models\Vehicle::class, 'veicolo');
  23. }
  24. public function anagrafica_data()
  25. {
  26. return $this->belongsTo(\App\Models\Anagrafica::class, 'anagrafica');
  27. }
  28. }