OwnerLogisticFeeDetail.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. ];
  22. public function ownerFeeDetail(): BelongsTo
  23. {
  24. return $this->belongsTo(OwnerFeeDetail::class);
  25. }
  26. public function ownerFeeDetailLogistic(): BelongsTo
  27. {
  28. return $this->belongsTo(OwnerFeeDetailLogistic::class, 'logistic_bill', 'logistic_bill');
  29. }
  30. public function logistic(): BelongsTo
  31. {
  32. return $this->belongsTo(Logistic::class);
  33. }
  34. }