hasOne(PluginWumaSourceProduce::class, 'batch', 'pbatch'); $one->with(['bindGoods', 'bindTemplate']); return $one; } /** * 鍏宠仈鐢熶骇鎵规鏁版嵁. */ public function bindProduce(): HasOne { return $this->produce()->bind([ 'tcode' => 'tcode', 'tname' => 'tname', 'ghash' => 'ghash', 'gcode' => 'gcode', 'gname' => 'gname', 'gspec' => 'gspec', 'gunit' => 'gunit', 'gcover' => 'gcover', ]); } /** * 鍏宠仈鐢熶骇妯℃澘鏁版嵁. */ public function assign(): HasOne { return $this->hasOne(PluginWumaSourceAssign::class, 'batch', 'batch'); } }