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

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

- Page: https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/app/Models/Activity.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.6.4/raw/app/Models/Activity.php
- Modified: 2026-06-11T12:21:58+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/Activity.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Models;

use FluentCart\Framework\Database\Orm\Relations\MorphTo;
use FluentCart\Framework\Database\Orm\Relations\HasOne;
use FluentCart\App\Models\Concerns\CanSearch;

class Activity extends Model
{
    use CanSearch;

    protected $table = 'fct_activity';

    protected $primaryKey = 'id';

    protected $guarded = ['id'];

    protected $fillable = [
        'status',
        'log_type',
        'module_id',
        'module_type',
        'module_name',
        'title',
        'content',
        'user_id',
        'read_status',
        'created_by'
    ];

    protected $casts = [
        'module_id'   => 'integer',
    ];

    /**
     * Get the parent activity model (order etc).
     */
    public function activity(): MorphTo
    {
        return $this->morphTo();
    }

    public function user(): HasOne
    {
        return $this->hasOne(User::class, 'ID', 'user_id')
                ->select(['ID', 'display_name', 'user_email']);
    }
}

```
