feat: enhance agent management and validation logic
- Updated AGENTS.md to clarify agent account restrictions and permissions. - Implemented checks in AgentNodeAdminUserStoreController and AgentNodeRoleStoreController to restrict admin user and role creation to the agent's own node. - Enhanced validation in AdminPlayerStoreController and AdminPlayerUpdateController to enforce credit limit and rebate rate rules based on player funding mode. - Refactored various request classes to utilize shared admin account field rules for consistency. - Improved error handling in services related to credit allocation and rebate limits to ensure proper validation and messaging.
This commit is contained in:
@@ -17,6 +17,18 @@ test('normalizes business shorthand unique in zh', function (): void {
|
||||
expect($errors['code'][0])->toBe('该内容已存在,请更换后重试。');
|
||||
});
|
||||
|
||||
test('normalizes rebate exceeds limit with field specific message in zh', function (): void {
|
||||
$errors = ApiValidationErrors::normalize(['rebate_rate' => ['exceeds_limit']], 'zh');
|
||||
|
||||
expect($errors['rebate_rate'][0])->toBe('回水比例不能超过代理回水上限。');
|
||||
});
|
||||
|
||||
test('normalizes settlement bill not payable in zh', function (): void {
|
||||
$errors = ApiValidationErrors::normalize(['bill' => ['not_payable']], 'zh');
|
||||
|
||||
expect($errors['bill'][0])->toBe('当前账单状态不允许登记收付,请先确认账单。');
|
||||
});
|
||||
|
||||
test('summary joins multiple field errors', function (): void {
|
||||
$normalized = [
|
||||
'code' => ['编码格式不正确。'],
|
||||
|
||||
Reference in New Issue
Block a user