hasOne(OwnerInStorageRule::class,"owner_price_operation_id","id"); } public function ownerOutStorageRules() { //出库规则 return $this->hasMany(OwnerOutStorageRule::class,"owner_price_operation_id","id"); } public function ownerPriceOperationOwners() { //货主中间表 return $this->belongsToMany(Owner::class,"owner_price_operation_owner","owner_price_operation_id","owner_id"); } public function getFeatureFormatAttribute() { if ($this->strategy == '默认')return "/"; return app("FeatureService")->formatFeature(self::$features,$this->feature,self::$columnMapping); } }