|
|
@@ -135,10 +135,10 @@ class PetGetValidator extends Validator
|
|
|
private function validatePetCountLimit(int $userId): bool
|
|
|
{
|
|
|
$petCount = PetUser::where('user_id', $userId)->count();
|
|
|
- $maxPets = config('pet.max_pets_per_user', 3);
|
|
|
+ $maxPets = 1; // 一人一宠限制
|
|
|
|
|
|
if ($petCount >= $maxPets) {
|
|
|
- $this->addError("已达到最大宠物数量限制: {$maxPets}");
|
|
|
+ $this->addError("每人只能拥有一只宠物");
|
|
|
return false;
|
|
|
}
|
|
|
|