38 lines
752 B
PHP
Executable File
38 lines
752 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class FornitoreStabileImpostazione extends Model
|
|
{
|
|
protected $table = 'fornitore_stabile_impostazioni';
|
|
|
|
protected $fillable = [
|
|
'stabile_id',
|
|
'fornitore_id',
|
|
'voce_spesa_default_id',
|
|
'conto_costo_default_id',
|
|
'meta',
|
|
];
|
|
|
|
protected $casts = [
|
|
'meta' => 'array',
|
|
];
|
|
|
|
public function stabile()
|
|
{
|
|
return $this->belongsTo(Stabile::class, 'stabile_id');
|
|
}
|
|
|
|
public function fornitore()
|
|
{
|
|
return $this->belongsTo(Fornitore::class, 'fornitore_id');
|
|
}
|
|
|
|
public function voceSpesaDefault()
|
|
{
|
|
return $this->belongsTo(VoceSpesa::class, 'voce_spesa_default_id');
|
|
}
|
|
}
|