openstamanager/modules/interventi/src/Intervento.php

32 lines
600 B
PHP
Raw Normal View History

2018-08-29 18:06:51 +02:00
<?php
namespace Modules\Interventi;
use Common\Model;
2018-08-29 18:06:51 +02:00
use Modules\Anagrafiche\Anagrafica;
class Intervento extends Model
{
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');
}
}