StationCacheShelfGrid.php 655 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  5. use App\Traits\ModelLogChanging;
  6. class StationCacheShelfGrid extends Model
  7. {
  8. use ModelLogChanging;
  9. protected $fillable = ['station_id','material_box_id','grid_id','status'];
  10. public static $status = [
  11. '0' => '无',
  12. '1' => '待处理',
  13. '2' => '完成',
  14. '3' => '异常'
  15. ];
  16. public function station(): BelongsTo
  17. {
  18. return $this->belongsTo(Station::class);
  19. }
  20. public function materialBox(): BelongsTo
  21. {
  22. return $this->belongsTo(MaterialBox::class);
  23. }
  24. }