hasOne(Category::class, 'id',"type"); } /** * 关联的平台商 * * @return HasOne */ public function agency(): HasOne { return $this->hasOne(Business::class, 'agency_code',"code"); } }