<?php

namespace App\Models;

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

class Product extends Model
{
    use HasFactory;

    use SoftDeletes;

    /**
     * The attributes that should be mutated to dates.
     *
     * @var array
     */
    protected $dates = ['deleted_at'];
    protected $guarded = [];


//    protected $fillable = ['sku_id', 'name', 'brand_id', 'weight', 'image', 'color',
//        'description_id', 'category_id', 'serial', 'subCategory_id', 'location_id', 'country', 'created_by', 'updated_by',
//        'status_id', 'metric_id', 'deleted_by',' deleted_at',
//        ];



 public function sales()
 {
     return $this->hasMany(Sale::class);
 }


 public function purchase()
 {
     return $this->belongsTo(Purchase::class);
 }


}
