<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Production extends Model
{
    public function worker(){
        return $this->belongsTo('App\Models\Worker');
    }
    public function user(){
        return $this->belongsTo('App\Models\User','created_by');
    }
    public function pd(){
        return $this->hasMany("App\Models\ProductionDetail",'production_id');
    }
}
