# fluent-cart/1.5.0/app/Models/ScheduledAction.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.5.0. 61 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.5.0/code/app/Models/ScheduledAction.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.5.0/raw/app/Models/ScheduledAction.php
- Modified: 2025-10-14T16:36:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-cart/1.5.0/code/app/Models/ScheduledAction.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Models;

use FluentCart\App\Services\PlanUpgradeService;
use FluentCart\Framework\Database\Orm\Builder;
use FluentCart\Framework\Support\Arr;

/**
 *  Meta Model - DB Model for Meta table
 *
 *  Database Model
 *
 * @package FluentCart\App\Models
 *
 * @version 1.0.0
 */
class ScheduledAction extends Model
{
    protected $table = 'fct_scheduled_actions';

    protected $primaryKey = 'id';

    protected $guarded = ['id'];

    protected $fillable = [
        'scheduled_at',
        'action',
        'status',
        'group',
        'object_id',
        'object_type',
        'completed_at',
        'retry_count',
        'data',
        'response_note',
    ];

    public function setDataAttribute($value)
    {
        if (is_array($value) || is_object($value)) {
            $this->attributes['data'] = json_encode($value);
        } else {
            $this->attributes['data'] = $value;
        }
    }

    public function getDataAttribute($value)
    {

        $decoded = json_decode($value, true);

        if ($decoded && is_array($decoded)) {
            return $decoded;
        }

        return [];
    }

}

```
