<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

use App\Traits\ModelLogChanging;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class StationTaskCommodity extends Model
{
    use ModelLogChanging;

    protected $fillable= ['station_id','material_box_id','commodity_id','amount','order_id','status',"bin_number","station_task_batch_id","material_box_position"];

    public function commodity(): BelongsTo
    {   //商品
        return $this->belongsTo(Commodity::class);
    }
    public function materialBox(): BelongsTo
    {   //料箱
        return $this->belongsTo(MaterialBox::class);
    }
    function stationTask(): BelongsTo
    {
        return $this->belongsTo(StationTask::class);
    }
}
