InventoryCompare.php 609 B

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