| 12345678910111213141516171819202122232425262728 |
- <?php
- namespace App;
- use Illuminate\Database\Eloquent\Model;
- use App\Traits\ModelLogChanging;
- class OwnerPriceDirectLogisticCar extends Model
- {
- use ModelLogChanging;
- protected $fillable = [
- "owner_price_direct_logistic_id", //直发车计费ID
- "car_type_id", //车型ID
- "base_fee", //起步费
- "additional_fee", //续费(元/KM)
- ];
- public function carType()
- { //车型
- return $this->hasOne(CarType::class,"id","car_type_id");
- }
- public function ownerPriceDirectLogistic()
- { //直发车计费
- return $this->belongsTo(OwnerPriceDirectLogistic::class,"owner_price_direct_logistic_id","id");
- }
- }
|