<?php

namespace App\Models;

use App\Modules\Users\Models\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class UserAiMemory extends Model
{
    protected $table = 'user_ai_memories';

    protected $fillable = [
        'user_id',
        'interests',
        'style_notes',
        'recent_topics',
        'extra',
    ];

    /**
     * @return array<string, string>
     */
    protected function casts(): array
    {
        return [
            'extra' => 'array',
        ];
    }

    /** @return BelongsTo<User, UserAiMemory> */
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }
}
