OrderDevice.php 968 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace App\Models;
  3. class OrderDevice extends BaseModel
  4. {
  5. public function device()
  6. {
  7. return $this->belongsTo('App\Models\Device', 'device_id');
  8. }
  9. public function inner_device()
  10. {
  11. return $this->belongsTo('App\Models\InnerDevice', 'inner_device_id');
  12. }
  13. public function device_name()
  14. {
  15. return $this->belongsTo('App\Models\DeviceName', 'device_name_id');
  16. }
  17. public function spec()
  18. {
  19. return $this->belongsTo('App\Models\Spec', 'spec_id');
  20. }
  21. public function rent_type()
  22. {
  23. return $this->belongsTo('App\Models\RentType', 'rent_type_id');
  24. }
  25. public function project()
  26. {
  27. return $this->belongsTo('App\Models\Project', 'project_id');
  28. }
  29. public function user()
  30. {
  31. return $this->belongsTo('App\Models\User', 'user_id');
  32. }
  33. public function order()
  34. {
  35. return $this->belongsTo('App\Models\Order', 'order_id');
  36. }
  37. }