Files
lotteryLaravel/app/Support/AdminUserStatus.php
kang 96545f87f6 feat: 增强代理节点和代理资料管理功能
- 在 AgentNodeProfileController 中添加对父代理能力授予的验证,确保子代理的权限在父代理范围内。
- 更新多个请求类,统一代理资料字段的验证逻辑,提升代码复用性。
- 引入 AgentProfileFieldRules 以简化代理资料更新请求的规则定义。
- 在 AgentProfile 模型中设置主键为 agent_node_id,确保与代理节点的关联性。
- 更新错误信息,增加对授信额度和占成比例的验证,确保数据一致性。
2026-06-04 10:15:10 +08:00

17 lines
383 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Support;
/** admin_users.status0=可登录1=禁用(与 agent_nodes 的 1=启用 不同)。 */
final class AdminUserStatus
{
public const ACTIVE = 0;
public const DISABLED = 1;
public static function fromAgentNodeStatus(int $agentNodeStatus): int
{
return (int) $agentNodeStatus === 1 ? self::ACTIVE : self::DISABLED;
}
}