updates to UI and add archiving option

This commit is contained in:
Simon Pocrnjič
2025-10-05 19:45:49 +02:00
parent fe91c7e4bc
commit bab9d6561f
50 changed files with 3337 additions and 416 deletions
+66
View File
@@ -0,0 +1,66 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ArchiveSetting extends Model
{
use HasFactory;
use SoftDeletes;
protected $fillable = [
'action_id',
'decision_id',
'segment_id',
'entities',
'name',
'description',
'enabled',
'strategy',
'soft',
'reactivate',
'options',
'created_by',
'updated_by',
];
protected function casts(): array
{
return [
'entities' => 'array',
'options' => 'array',
'enabled' => 'boolean',
'soft' => 'boolean',
'reactivate' => 'boolean',
];
}
// Relationships (nullable FKs)
public function action()
{
return $this->belongsTo(Action::class);
}
public function decision()
{
return $this->belongsTo(Decision::class);
}
public function segment()
{
return $this->belongsTo(Segment::class);
}
public function creator()
{
return $this->belongsTo(User::class, 'created_by');
}
public function updater()
{
return $this->belongsTo(User::class, 'updated_by');
}
}