<?php

namespace App\Models;

use App\Models\Product;
use Illuminate\Database\Eloquent\Model;

class ClientVersion extends Model
{
    protected $fillable = [
        'title',
        'tag',
        'description',
        'cost',
        'timeline',
        'note',
        'version',
        'product_id',
        'category_id',
    ];

    /* ---------------- Relationships ---------------- */

    public function product()
    {
        return $this->belongsTo(Product::class);
    }

    public function category()
    {
        return $this->belongsTo(ProductCategory::class, 'category_id');
    }
}
