OwnerPriceDirectLogisticCar.php 750 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. class OwnerPriceDirectLogisticCar extends Model
  6. {
  7. use ModelLogChanging;
  8. protected $fillable = [
  9. "owner_price_direct_logistic_id", //直发车计费ID
  10. "car_type_id", //车型ID
  11. "base_fee", //起步费
  12. "additional_fee", //续费(元/KM)
  13. ];
  14. public function carType()
  15. { //车型
  16. return $this->hasOne(CarType::class,"id","car_type_id");
  17. }
  18. public function ownerPriceDirectLogistic()
  19. { //直发车计费
  20. return $this->belongsTo(OwnerPriceDirectLogistic::class,"owner_price_direct_logistic_id","id");
  21. }
  22. }