# fluent-support/1.10.4/app/Models/AIActivityLogs.php

Fluent Support – Helpdesk &amp; Customer Support Ticket System, version 1.10.4. 39 lines.

- Page: https://pluginprobe.com/plugins/fluent-support/1.10.4/code/app/Models/AIActivityLogs.php
- Raw: https://pluginprobe.com/plugins/fluent-support/1.10.4/raw/app/Models/AIActivityLogs.php
- Modified: 2024-08-15T13:05:42+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-support/1.10.4/code/app/Models/AIActivityLogs.php#L10-L20`.

```php
<?php

namespace FluentSupport\App\Models;

class AIActivityLogs extends Model
{
    protected $table = 'fs_ai_activity_logs';

    protected $fillable = ['agent_id', 'ticket_id', 'model_name', 'tokens', 'prompt'];

    public static function boot()
    {
        parent::boot();

        static::creating(function ($model) {
            $model->created_at = current_time('mysql');
            $model->updated_at = current_time('mysql');
        });
    }

    public function person()
    {
        $class = __NAMESPACE__ . '\Person';

        return $this->belongsTo(
            $class, 'agent_id', 'id'
        );
    }

    public function ticket()
    {
        $class = __NAMESPACE__ . '\Ticket';

        return $this->belongsTo(
            $class, 'ticket_id', 'id'
        );
    }
}

```
