<?php

namespace App;

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

class Stock_Movement extends Model
{
    protected  $fillable= ['product_id', 'from_store_id', 'type','to_store_id ', 'quantity', 'created_by', 'updated_by', 'received_by',
        'received_date', 'status_id', 'created_at', 'updated_at', 'deleted_by', 'deleted_at'];

    use SoftDeletes;

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

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

    public function user()
    {
        return $this->belongsTo(User::class);
    }

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


}
