| 123456789101112131415161718192021222324 |
- <?php
- namespace App;
- use Illuminate\Database\Eloquent\Model;
- class OwnerPriceExpressProvince extends Model
- {
- protected $fillable = [
- "owner_price_express_id", //快递价格ID
- "province_id", //省份ID
- "initial_weight_price", //初始单价
- "additional_weight_price", //续重单价
- ];
- public function ownerPriceExpress()
- { //快递计费
- $this->belongsTo(OwnerPriceExpress::class,"owner_price_express_id","id");
- }
- public function province()
- { //省份
- $this->hasOne(Province::class,"id","province_id");
- }
- }
|