OwnerPriceExpress.php 621 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. class OwnerPriceExpress extends Model
  5. {
  6. protected $fillable = [
  7. "name", //名称
  8. "initial_weight_unit_id", //首重单位
  9. "additional_weight_unit_id",//续重单位
  10. ];
  11. public function owners()
  12. { //货主
  13. $this->belongsToMany(Owner::class,"owner_price_express_owner","owner_price_express_id","owner_id");
  14. }
  15. public function logistics()
  16. { //物流
  17. $this->belongsToMany(Logistic::class,"owner_price_express_logistic","owner_price_express_id","logistic_id");
  18. }
  19. }