<?php

declare(strict_types=1);

namespace Kylin\RiskEngine\Enums;

/**
 * 风险事件类型
 */
enum RiskEventType: string
{
    case DEVICE_ACCOUNT_SWITCH      = 'device_account_switch';
    case IP_REGISTRATION_BURST      = 'ip_registration_burst';
    case ADULT_LATE_NIGHT_LOGIN     = 'adult_late_night_login';
    case RAPID_PAYMENT_LIMIT_HIT    = 'rapid_payment_limit_hit';
    case AGE_BEHAVIOR_MISMATCH      = 'age_behavior_mismatch';
    case GUARDIAN_REFUND_HIT        = 'guardian_refund_hit';

    public function label(): string
    {
        return match ($this) {
            self::DEVICE_ACCOUNT_SWITCH   => '设备频繁切换账号',
            self::IP_REGISTRATION_BURST   => '单IP大量注册',
            self::ADULT_LATE_NIGHT_LOGIN  => '成年账号深夜高频登录',
            self::RAPID_PAYMENT_LIMIT_HIT => '充值额快速触及月限',
            self::AGE_BEHAVIOR_MISMATCH   => '实名年龄与行为不匹配',
            self::GUARDIAN_REFUND_HIT     => '监护人申诉退款命中',
        };
    }
}
