<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class FabricationFormula extends Model
{
    protected $guarded = ['id'];

    public function branch() {
        return $this->belongsTo(Branch::class);
    }

    public function resultProduct() {
        return $this->belongsTo(Product::class, 'result_product_id');
    }

    public function items() {
        return $this->hasMany(FabricationFormulaItem::class);
    }
}