<?php

namespace App;

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

use App\Traits\ModelLogChanging;

class Store extends Model
{
    use ModelLogChanging;

    use ModelTimeFormat;
    use SoftDeletes;

    protected $fillable=[
        'asn_code','warehouse_id','owner_id','stored_method','status','remark','deleted_at','is_fast_stored'
    ];

    public function owner(){
        return $this->belongsTo('App\Owner','owner_id','id');
    }

    public function warehouse(){
        return $this->belongsTo('App\Warehouse','warehouse_id','id');
    }
    public function storeItems(){
        return $this->hasMany('App\StoreItem','store_id','id');
    }
}
