<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class subvendor_armsclamps_invoices extends Model
{
    use HasFactory;
    protected $table='subvendor_armsclamps_invoices';
    protected $fillable=['from_jilla_id', 'suplied_by', 'armsdata', 'quantity', 'to_subvendor_id',"inward_id", 'status','remarks','date_of_transfer', 'files','received_arms_dia_25','received_arms_dia_inner_32','received_arms_dia_inner_40','received_clams_set_25','received_clams_set_40_2', 'received_clams_set_40_3', 'received_aluminium_cable','from_invoice_number','to_invoice_number'];

    public function from_district()
    {
        return $this->hasOne('App\Models\area_master','id','from_jilla_id');
    }
     public function to_district()
    {
        return $this->hasOne('App\Models\area_master','id','to_jilla_id');
    }
     public function suplied_details()
    {
        return $this->hasOne('App\Models\Makelist','name','suplied_by');
    }
}