style updates

This commit is contained in:
Mark Gregory
2026-07-24 14:59:44 +01:00
parent 24ab771cd3
commit dd23205d0b
482 changed files with 7173 additions and 1435 deletions
+21 -5
View File
@@ -1,12 +1,28 @@
<?php
namespace Modules\Automation\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
final class Automation extends Model
{
protected $fillable=['name','description','trigger_type','trigger_config','status','stop_on_failure','run_count','last_ran_at','next_run_at','created_by'];
protected $casts=['trigger_config'=>'array','stop_on_failure'=>'boolean','last_ran_at'=>'datetime','next_run_at'=>'datetime'];
public function steps(): HasMany { return $this->hasMany(AutomationStep::class)->orderBy('position'); }
public function runs(): HasMany { return $this->hasMany(AutomationRun::class); }
public function isActive(): bool { return $this->status === 'active'; }
protected $fillable = ['name', 'description', 'trigger_type', 'trigger_config', 'status', 'stop_on_failure', 'run_count', 'last_ran_at', 'next_run_at', 'created_by'];
protected $casts = ['trigger_config' => 'array', 'stop_on_failure' => 'boolean', 'last_ran_at' => 'datetime', 'next_run_at' => 'datetime'];
public function steps(): HasMany
{
return $this->hasMany(AutomationStep::class)->orderBy('position');
}
public function runs(): HasMany
{
return $this->hasMany(AutomationRun::class);
}
public function isActive(): bool
{
return $this->status === 'active';
}
}
+16 -4
View File
@@ -1,12 +1,24 @@
<?php
namespace Modules\Automation\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
final class AutomationRun extends Model
{
protected $fillable=['automation_id','execution_id','trigger_type','payload','status','current_step','error','started_at','finished_at'];
protected $casts=['payload'=>'array','started_at'=>'datetime','finished_at'=>'datetime'];
public function automation(): BelongsTo { return $this->belongsTo(Automation::class); }
public function logs(): HasMany { return $this->hasMany(AutomationRunLog::class); }
protected $fillable = ['automation_id', 'execution_id', 'trigger_type', 'payload', 'status', 'current_step', 'error', 'started_at', 'finished_at'];
protected $casts = ['payload' => 'array', 'started_at' => 'datetime', 'finished_at' => 'datetime'];
public function automation(): BelongsTo
{
return $this->belongsTo(Automation::class);
}
public function logs(): HasMany
{
return $this->hasMany(AutomationRunLog::class);
}
}
@@ -1,9 +1,14 @@
<?php
namespace Modules\Automation\Models;
use Illuminate\Database\Eloquent\Model;
final class AutomationRunLog extends Model
{
public $timestamps=false;
protected $fillable=['automation_run_id','automation_step_id','level','message','context','created_at'];
protected $casts=['context'=>'array','created_at'=>'datetime'];
public $timestamps = false;
protected $fillable = ['automation_run_id', 'automation_step_id', 'level', 'message', 'context', 'created_at'];
protected $casts = ['context' => 'array', 'created_at' => 'datetime'];
}
+11 -3
View File
@@ -1,10 +1,18 @@
<?php
namespace Modules\Automation\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
final class AutomationStep extends Model
{
protected $fillable=['automation_id','position','action_type','name','configuration','is_enabled'];
protected $casts=['configuration'=>'array','is_enabled'=>'boolean'];
public function automation(): BelongsTo { return $this->belongsTo(Automation::class); }
protected $fillable = ['automation_id', 'position', 'action_type', 'name', 'configuration', 'is_enabled'];
protected $casts = ['configuration' => 'array', 'is_enabled' => 'boolean'];
public function automation(): BelongsTo
{
return $this->belongsTo(Automation::class);
}
}