<?php

namespace App\Models\Qualitys;

use App\Models\Orders\Order;
use Illuminate\Database\Eloquent\Model;

class QualityDocumentOrder extends Model
{
    protected $table = 'quality_document_orders';

    protected $fillable = [
        'quality_document_id',
        'order_id',
    ];

    public function qualityDocument()
    {
        return $this->belongsTo(QualityDocument::class);
    }

    public function order()
    {
        return $this->belongsTo(Order::class);
    }

    public function locations()
    {
        return $this->hasMany(QualityDocumentLocation::class);
    }
}
