<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Products extends Model
{
    use SoftDeletes;

    protected $table='products';
    protected $fillable = [
        'product_code',
        'catalogue_code',
        'name',
        'description',
        'image',
        'material',
        'avg_purchase_price',
        'avg_selling_price',
        'min_stock_level',
        'max_stock_level',

    ];
    public function product_category(){
        return $this->belongsTo(ProductCategories::class,'product_category_id');
    }



    // public function getImageAttribute($value)
    // {
    //     return 'env'.$value ;
    // }
}
