2018-08-29 18:06:51 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Modules\Interventi;
|
|
|
|
|
2018-12-14 09:46:35 +01:00
|
|
|
use Common\Document;
|
2018-08-29 18:06:51 +02:00
|
|
|
use Modules\Anagrafiche\Anagrafica;
|
|
|
|
|
2018-12-14 09:46:35 +01:00
|
|
|
class Intervento extends Document
|
2018-08-29 18:06:51 +02:00
|
|
|
{
|
|
|
|
protected $table = 'in_interventi';
|
|
|
|
|
|
|
|
public function anagrafica()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Anagrafica::class, 'idanagrafica');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function stato()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Stato::class, 'idstatointervento');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function articoli()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Articolo::class, 'idintervento');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function righe()
|
|
|
|
{
|
|
|
|
return $this->hasMany(Riga::class, 'idintervento');
|
|
|
|
}
|
|
|
|
}
|