<?php

namespace App\Models;

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

class GrapeVarietyVariant extends Model
{
    /** @use HasFactory<\Database\Factories\GrapeVarietyVariantFactory> */
    use HasFactory;
    // The migrations create the default `id` primary key for grape_variety_variants.
    // Do not override $primaryKey so Eloquent uses the database `id` column.

    protected $fillable = [
        'grape_variety_id',
        'color',
    ];

    public function grapeVariety()
    {
        return $this->belongsTo(GrapeVariety::class, 'grape_variety_id');
    }
}
