<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ProductionDetail extends Model
{
    public function worker(){
        return $this->belongsTo("App\Models\Worker");
    }
    public function product(){
        return $this->belongsTo("App\Models\Product",'product_id');
    }
    public function category(){
        return $this->belongsTo("App\Models\Productcategory",'productcategory_id');
    }
    public function unit(){
        return $this->belongsTo("App\Models\Unit");
    }
    public function production(){
	    return $this->belongsTo('App\Models\Production');
	}
	public function stock(){
        return $this->belongsTo("App\Models\ProductionStock",'product_id');
    }
}
