<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Sorting extends Model
{
    public $timestamps = true;
    protected $table = 'sorting';

    protected $fillable = [
        'sort_date',
        'supplier_id',
        'date_from',
        'date_to',
        'sell_store_id',
        'quantity',
        'note',
        'branch_id'
    ];


    public function branch()
    {
        return $this->belongsTo('App\Branch');
    }

    public function supplier()
    {
        return $this->belongsTo('App\Supplier', 'supplier_id');
    }

    public function sell_store()
    {
        return $this->belongsTo('App\Store_Branch', 'sell_store_id');
    }
    
}

