<?php

namespace App\Models;

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

class BaselineSnapshotItem extends Model
{
    use HasFactory;

    protected $guarded = [];

    protected $casts = [
        'meta_jsonb' => 'array',
    ];

    public function snapshot(): BelongsTo
    {
        return $this->belongsTo(BaselineSnapshot::class, 'baseline_snapshot_id');
    }
}
