OwnerLogisticFeeDetail.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  6. use Illuminate\Database\Eloquent\Relations\HasOne;
  7. class OwnerLogisticFeeDetail extends Model
  8. {
  9. use ModelLogChanging;
  10. public $fillable = [
  11. 'owner_fee_detail_id', //
  12. 'logistic_bill',//快递单号
  13. 'initial_weight',//首重
  14. 'initial_weight_price',//首重价格
  15. 'additional_weight',//续重
  16. 'additional_price',//续重价格
  17. 'logistic_id',//承运商
  18. 'owner_id',//货主
  19. 'additional_weigh_weight',//续重重量
  20. 'tax_fee',//税费
  21. 'fee'//费用
  22. ];
  23. public function ownerFeeDetail(): BelongsTo
  24. {
  25. return $this->belongsTo(OwnerFeeDetail::class);
  26. }
  27. public function ownerFeeDetailLogistic(): BelongsTo
  28. {
  29. return $this->belongsTo(OwnerFeeDetailLogistic::class, 'logistic_bill', 'logistic_bill');
  30. }
  31. public function logistic(): BelongsTo
  32. {
  33. return $this->belongsTo(Logistic::class);
  34. }
  35. }