45 lines
964 B
PHP
45 lines
964 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class AffittoCanonePagato extends Model
|
|
{
|
|
protected $table = 'affitti_canoni_pagati';
|
|
|
|
protected $fillable = [
|
|
'affitto_id',
|
|
'anno',
|
|
'mese',
|
|
'mese_descrizione',
|
|
'data_pagamento',
|
|
'descrizione',
|
|
'fitto',
|
|
'istat_percentuale',
|
|
'istat_importo',
|
|
'descrizione_1',
|
|
'descrizione_2',
|
|
'importo_1',
|
|
'importo_2',
|
|
'bollo',
|
|
'totale',
|
|
];
|
|
|
|
protected $casts = [
|
|
'data_pagamento' => 'date',
|
|
'fitto' => 'decimal:2',
|
|
'istat_percentuale' => 'decimal:3',
|
|
'istat_importo' => 'decimal:2',
|
|
'importo_1' => 'decimal:2',
|
|
'importo_2' => 'decimal:2',
|
|
'bollo' => 'decimal:2',
|
|
'totale' => 'decimal:2',
|
|
];
|
|
|
|
public function affitto()
|
|
{
|
|
return $this->belongsTo(AffittoImmobile::class, 'affitto_id');
|
|
}
|
|
}
|