海南旅游SAAS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
643 B

4 years ago
4 years ago
  1. <?php
  2. namespace App\Models;
  3. use Dcat\Admin\Traits\HasDateTimeFormatter;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. class IndustryOrder extends BaseModel
  6. {
  7. use HasDateTimeFormatter;
  8. use SoftDeletes;
  9. protected $guarded = ['id'];
  10. public function supplier()
  11. {
  12. return $this->belongsTo(Supplier::class)->withTrashed();
  13. }
  14. public function agent()
  15. {
  16. return $this->belongsTo(Agent::class)->withTrashed();
  17. }
  18. public function industryProduct()
  19. {
  20. return $this->belongsTo(IndustryProduct::class);
  21. }
  22. public function spec()
  23. {
  24. return $this->hasOne(IndustryProductSpec::class, 'id', 'industry_product_spec_id');
  25. }
  26. }