<?php

namespace App\Models;

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

class Rfq extends Model
{
    use HasFactory;

    protected $fillable = [
        'buyer_id',
        'title',
        'description',
        'category_id',
        'quantity',
        'delivery_location',
        'country',
        'budget',
        'status',
    ];

    public function buyer()
    {
        return $this->belongsTo(Buyer::class);
    }

    public function quotes()
    {
        return $this->hasMany(Quote::class);
    }

    public function category()
    {
        return $this->belongsTo(Category::class);
    }
}
