| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace App;
- use Illuminate\Database\Eloquent\Model;
- use App\Traits\ModelLogChanging;
- class TaskTransaction extends Model
- {
- use ModelLogChanging;
- protected $fillable = [
- "doc_code", //单号
- "bar_code", //条码
- "fm_station_id",//来源库位
- "to_station_id",//目标库位
- "material_box_id",//料箱
- "task_id", //机器人任务
- "commodity_id", //商品
- "amount", //数量
- "type", //类型
- "status", //状态
- "user_id", //操作人
- "mark", //标记
- "bin_number", //格口号
- "lot_num", //批号
- "track_num", //跟踪号
- ];
- const STATUS = [
- 0 => "待做",
- 1 => "完成",
- 2 => "失败",
- 3 => "队列",
- ];
- const MARK = [
- 0 => "无",
- 1 => "缓存架半箱入库",
- 2 => "料箱出至缓存架"
- ];
- public function materialBox()
- { //料箱
- return $this->belongsTo(MaterialBox::class);
- }
- public function task()
- { //任务
- return $this->belongsTo(StationTaskMaterialBox::class,"task_id");
- }
- }
|