OwnerPriceLogisticDetail.php 1017 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. class OwnerPriceLogisticDetail extends Model
  6. {
  7. use ModelLogChanging;
  8. protected $fillable = [
  9. "owner_price_logistic_id", //物流计费
  10. "unit_id", //单位ID
  11. "range", //区间
  12. "province_id", //省份ID
  13. "city_id", //城市ID
  14. "unit_price", //单价
  15. "delivery_fee", //送货费
  16. "initial_fee", //起始计费
  17. "initial_amount", //起始计数
  18. "rate", //费率
  19. ];
  20. public function unit()
  21. { //单位
  22. return $this->hasOne(Unit::class,"id","unit_id");
  23. }
  24. public function province()
  25. { //省份
  26. return $this->hasOne(Province::class,"id","province_id");
  27. }
  28. public function city()
  29. { //城市
  30. return $this->hasOne(City::class,"id","city_id");
  31. }
  32. }