- Added new automation-related routes and controllers for managing automations. - Introduced automation nodes in the UI with distinct styles and interactions. - Updated sidebar to include navigation for automations. - Enhanced post creation logic to support automation metadata. - Refactored content type and platform enums into types for better type safety. - Added localization for automation-related terms in English, Spanish, and Portuguese. - Improved error handling in various components to accommodate new features.
33 lines
812 B
PHP
33 lines
812 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\Automation\Node\Type as NodeType;
|
|
use App\Enums\Automation\NodeRun\Status;
|
|
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class AutomationNodeRun extends Model
|
|
{
|
|
use HasFactory;
|
|
use HasUuids;
|
|
|
|
protected $guarded = [];
|
|
|
|
protected $casts = [
|
|
'status' => Status::class,
|
|
'node_type' => NodeType::class,
|
|
'input' => 'array',
|
|
'output' => 'array',
|
|
'error' => 'array',
|
|
'started_at' => 'datetime',
|
|
'finished_at' => 'datetime',
|
|
];
|
|
|
|
public function run(): BelongsTo
|
|
{
|
|
return $this->belongsTo(AutomationRun::class, 'run_id');
|
|
}
|
|
}
|