OwnerFeeDetailLogistic.php 651 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. use Illuminate\Database\Eloquent\Relations\HasOne;
  6. class OwnerFeeDetailLogistic extends Model
  7. {
  8. use ModelLogChanging;
  9. protected $fillable=[
  10. "owner_fee_detail_id","amount","logistic_bill","volume","weight","logistic_fee","tax_fee"
  11. ];
  12. public $timestamps = false;
  13. public function logistic()
  14. { //快递
  15. return $this->belongsTo(Logistic::class);
  16. }
  17. public function ownerLogisticFeeDetail(): HasOne
  18. {
  19. return $this->hasOne(OwnerLogisticFeeDetail::class, 'logistic_bill', 'logistic_bill');
  20. }
  21. }