| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace App;
- use Illuminate\Database\Eloquent\Model;
- use App\Traits\ModelLogChanging;
- class Storage extends Model
- {
- use ModelLogChanging;
- protected $fillable = [
- "station_id",
- "material_box_id",
- "commodity_id",
- "amount",
- "status"
- ];
- const STATUS=[
- 0 => "正常",
- 1 => "占用",
- ];
- public function materialBox()
- { //料箱
- $this->belongsTo(MaterialBox::class);
- }
- public function commodity()
- { //商品
- $this->belongsTo(Commodity::class);
- }
- }
|