<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class inwards_vendor extends Model
{
   

     use HasFactory;
    protected $table='inwards_vendor';
      protected $fillable=['jilla_id','vendor_id','maker_name','invoice_date','invoice_number','num_drivers','num_drv_rcv_qty','num_spd','num_spd_rcv_qty','tiltable_adapters','tiltadap_rcv_qty','led_wattage_18','rcv_qty_18w','led_wattage_35','rcv_qty_35w','led_wattage_70','rcv_qty_70w','led_wattage_110','rcv_qty_110w','led_wattage_190','rcv_qty_190w','buffer_stock','bufstck_rcv_qty','total','total_rcv_qty','remarks','files','date_of_receiving','bufferstck_received_qty_18w','bufferstck_received_qty_35w','bufferstck_received_qty_70w','bufferstck_received_qty_110w','bufferstck_received_qty_190w','bufferstck_invoice_qty_18w','bufferstck_invoice_qty_35w','bufferstck_invoice_qty_70w','bufferstck_invoice_qty_110w','bufferstck_invoice_qty_190w','drivers_received_qty_18w','drivers_received_qty_35w','drivers_received_qty_70w','drivers_received_qty_110w','drivers_received_qty_190w','drivers_invoice_qty_18w','drivers_invoice_qty_35w','drivers_invoice_qty_70w','drivers_invoice_qty_110w','drivers_invoice_qty_190w','spd_received_qty_18w','spd_received_qty_35w','spd_received_qty_70w','spd_received_qty_110w','spd_received_qty_190w','spds_invoice_qty_18w','spd_invoice_qty_35w','spd_invoice_qty_70w','spd_invoice_qty_110w','spd_invoice_qty_190w','approve_status'];


        public function area_district()
    {
        return $this->hasOne('App\Models\area_master','id','jilla_id');
    }
    
         public function vendor_name()
    {
        return $this->hasOne('App\Models\gramuser','id','vendor_id');
    }
}
