hasOne(Unit::class,"id","unit_id"); } /* 格式化依据静态参数,在调用前设置 */ public function getFeatureFormatAttribute() { if ($this->strategy == '默认')return "/"; return app("FeatureService")->formatFeature(self::$features,$this->feature,self::$columnMapping); } }