42 lines
822 B
PHP
Executable File
42 lines
822 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class GesconImportMapping extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'gescon_import_mappings';
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'legacy_code',
|
|
'legacy_denominazione',
|
|
'source_path',
|
|
'stabile_id',
|
|
'status',
|
|
'last_dry_run_at',
|
|
'last_sync_at',
|
|
'meta',
|
|
];
|
|
|
|
protected $casts = [
|
|
'last_dry_run_at' => 'datetime',
|
|
'last_sync_at' => 'datetime',
|
|
'meta' => 'array',
|
|
];
|
|
|
|
public function stabile()
|
|
{
|
|
return $this->belongsTo(Stabile::class, 'stabile_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id');
|
|
}
|
|
}
|