<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Pgvector\Laravel\HasNeighbors;
use Pgvector\Laravel\Vector;

/**
 * Class MemeMediaEmbedding
 *
 * @property int $id
 * @property int $meme_media_id
 * @property string $keyword
 * @property Vector $embedding
 * @property string|null $tag
 * @property Carbon|null $created_at
 * @property Carbon|null $updated_at
 * @property MemeMedia $meme_media
 */
class MemeMediaEmbedding extends Model
{
    use HasNeighbors;

    protected $table = 'meme_media_embeddings';

    protected $casts = [
        'meme_media_id' => 'int',
        'embedding' => Vector::class,
    ];

    protected $fillable = [
        'meme_media_id',
        'keyword',
        'embedding',
        'tag',
    ];

    public function meme_media()
    {
        return $this->belongsTo(MemeMedia::class);
    }
}
