InventoryCompare.php 548 B

1234567891011121314151617181920
  1. <?php
  2. namespace App;
  3. use App\Traits\ModelTimeFormat;
  4. use Illuminate\Database\Eloquent\Model;
  5. class InventoryCompare extends Model
  6. {
  7. use ModelTimeFormat;
  8. protected $fillable=[
  9. 'owner_id','commodity_id', 'mission_code', 'source','custom_location','quality','amount_in_sys','amount_in_compare','differ','created_at',
  10. ];
  11. public function commodity(){
  12. return $this->belongsTo('App\Commodity','commodity_id','id');
  13. }
  14. public function owner(){
  15. return $this->belongsTo('App\Owner','owner_id','id');
  16. }
  17. }