25 lines
543 B
PHP
25 lines
543 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Concerns\HasUuid;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Automation extends Model
|
|
{
|
|
use HasUuid;
|
|
|
|
protected $fillable = [
|
|
'uuid', 'name', 'enabled', 'trigger_type', 'trigger_config',
|
|
'conditions', 'actions', 'cooldown_seconds', 'last_triggered_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'enabled' => 'boolean',
|
|
'trigger_config' => 'array',
|
|
'conditions' => 'array',
|
|
'actions' => 'array',
|
|
'last_triggered_at' => 'datetime',
|
|
];
|
|
}
|