51 lines
1.0 KiB
PHP
51 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class RevisionePrecedenteAmministratore extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'revisione_precedenti_amministratori';
|
|
|
|
protected $fillable = [
|
|
'stabile_id',
|
|
'rubrica_id',
|
|
'precedente_amministratore',
|
|
'gestionale',
|
|
'passaggio_consegne_path',
|
|
'note',
|
|
'creato_da',
|
|
'modificato_da',
|
|
];
|
|
|
|
protected $casts = [
|
|
'created_at' => 'datetime',
|
|
'updated_at' => 'datetime',
|
|
'deleted_at' => 'datetime',
|
|
];
|
|
|
|
public function stabile()
|
|
{
|
|
return $this->belongsTo(Stabile::class, 'stabile_id');
|
|
}
|
|
|
|
public function rubrica()
|
|
{
|
|
return $this->belongsTo(RubricaUniversale::class, 'rubrica_id');
|
|
}
|
|
|
|
public function createBy()
|
|
{
|
|
return $this->belongsTo(User::class, 'creato_da');
|
|
}
|
|
|
|
public function updatedBy()
|
|
{
|
|
return $this->belongsTo(User::class, 'modificato_da');
|
|
}
|
|
}
|