<?php

namespace App\Models;

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

class ProductsQuote extends Model
{
    use HasFactory;
       protected $table = 'products_quotes';
      protected $fillable = [
        'Product_Code',
        'P_Ar_Name',
        'P_En_Name',
        'V_Name',
        'VV_Name',
        'Original_Qty',
        'AvQty',
        'Qty',
        'Price',
        'Discount',
        'TDiscount',
        'Tax',
        'Total_Bf_Tax',
        'Total_Tax',
        'Total',
        'Store',
        'Product',
        'Exp_Date',
        'V1',
        'V2',
        'Unit',
        'S_Quote',
        'Patch_Number',
        'Total_Wight',
        'UnitRate',
        'weight',
        'SalesProDesc',
        'TotCostNew',



        'SmallQty',
        'SmallCode',
        'CostPrice',
        'Date',
           'Patch_Number',
           'Branch',
           'Group',
           'Brand',
           'Pro_Note',
           'SubVID',
           'Total_Net',


    ];

         public function Store()
    {
        return $this->belongsTo(Stores::class,'Store');
    }

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

            public function V1()
    {
        return $this->belongsTo(SubVirables::class,'V1');
    }

            public function V2()
    {
        return $this->belongsTo(SubVirables::class,'V2');
    }

            public function Unit()
    {
        return $this->belongsTo(Measuerments::class,'Unit');
    }

            public function S_Quote()
    {
        return $this->belongsTo(Quote::class,'S_Quote');
    }
}
