OwnerPriceExpressProvince.php 616 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. class OwnerPriceExpressProvince extends Model
  5. {
  6. protected $fillable = [
  7. "owner_price_express_id", //快递价格ID
  8. "province_id", //省份ID
  9. "initial_weight_price", //初始单价
  10. "additional_weight_price", //续重单价
  11. ];
  12. public function ownerPriceExpress()
  13. { //快递计费
  14. $this->belongsTo(OwnerPriceExpress::class,"owner_price_express_id","id");
  15. }
  16. public function province()
  17. { //省份
  18. $this->hasOne(Province::class,"id","province_id");
  19. }
  20. }