OwnerPriceLogisticDetail.php 956 B

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