<?php

namespace App;

use App\Traits\ModelTimeFormat;
use Illuminate\Database\Eloquent\Model;

use App\Traits\ModelLogChanging;

class StoreCheckingReceiveItem extends Model
{
    use ModelLogChanging;

    use ModelTimeFormat;
    public $timestamps=false;
    protected $fillable=[
        "store_checking_receive_id","bin_number","commodity_id","imported_amount","counted_amount",
        "asn_amount","imported_diff_amount","asn_diff_amount",
        "produced_at","invalid_at","batch_code","unique_code"
    ];

    public function commodity(){
        return $this->hasOne('App\Commodity','id','commodity_id')->select('id','name','sku');
    }
    public function storeCheckingReceive(){
        return $this->belongsTo('App\StoreCheckingReceive','store_checking_receive_id','id');
    }
}
