<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class AiProductImageIndex extends Model
{
    use HasFactory;

    protected $guarded = ['id'];

    protected $casts = [
        'embedding' => 'array',
        'indexed_at' => 'datetime',
    ];

    public function item()
    {
        return $this->belongsTo(Item::class, 'item_id');
    }
}
