36 lines
678 B
PHP
36 lines
678 B
PHP
<?php
|
|
|
|
namespace App\Modules\Contabilita\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class RegolaPrimaNota extends Model
|
|
{
|
|
protected $table = 'contabilita_regole_prima_nota';
|
|
|
|
protected $fillable = [
|
|
'stabile_id',
|
|
'origine',
|
|
'chiave',
|
|
'label',
|
|
'note',
|
|
'conto_dare_id',
|
|
'conto_avere_id',
|
|
'attiva',
|
|
];
|
|
|
|
protected $casts = [
|
|
'attiva' => 'boolean',
|
|
];
|
|
|
|
public function contoDare()
|
|
{
|
|
return $this->belongsTo(PianoConti::class, 'conto_dare_id');
|
|
}
|
|
|
|
public function contoAvere()
|
|
{
|
|
return $this->belongsTo(PianoConti::class, 'conto_avere_id');
|
|
}
|
|
}
|