TaskTransaction.php 737 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. class TaskTransaction extends Model
  6. {
  7. use ModelLogChanging;
  8. protected $fillable = [
  9. "doc_code",
  10. "bar_code",
  11. "fm_station_id",
  12. "to_station_id",
  13. "material_box_id",
  14. "task_id",
  15. "commodity_id",
  16. "amount",
  17. "type",
  18. "status",
  19. "user_id",
  20. "mark"
  21. ];
  22. const STATUS = [
  23. 0 => "待做",
  24. 1 => "完成",
  25. 2 => "失败"
  26. ];
  27. const MARK = [
  28. 0 => "无",
  29. 1 => "缓存架半箱入库"
  30. ];
  31. public function materialBox()
  32. { //料箱
  33. return $this->belongsTo(MaterialBox::class);
  34. }
  35. }