# fluent-cart/1.6.4/app/Models/OrderOperation.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.6.4. 71 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/app/Models/OrderOperation.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.6.4/raw/app/Models/OrderOperation.php
- Modified: 2026-08-20T12:34:14+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.6.4/code/app/Models/OrderOperation.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Models;

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

    protected $primaryKey = 'id';

    protected $guarded = ['id'];

    protected $fillable = [
        'order_id',
        'created_via',
        'has_tax',
        'has_discount',
        'coupons_counted',
        'emails_sent',
        'sales_recorded',
        'utm_campaign',
        'utm_term',
        'utm_source',
        'utm_content',
        'utm_medium',
        'utm_id',
        'cart_hash',
        'refer_url',
        'meta',
    ];


    public function setMetaAttribute($value)
    {

        if ($value) {
            $decoded = \json_encode($value, true);
            if (!($decoded)) {
                $decoded = '[]';
            }
        } else {
            $decoded = '[]';
        }

        $this->attributes['meta'] = $decoded;
    }

    public function getMetaAttribute($value)
    {
        if (!$value) {
            return [];
        }

        return \json_decode($value, true);
    }

    public function order(): \FluentCart\Framework\Database\Orm\Relations\BelongsTo
    {
        return $this->belongsTo(Order::class, 'order_id', 'id');
    }
}

```
