hasOne(Business::class, 'code', 'business_code'); } /** * 关联的用户 */ public function account() { return $this->hasOne(Account::class, 'user_code', 'user_code'); } }