package com.jeesharp.business.modules.contentsecurity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 内容安全检测场景，与微信 msgSecCheck scene 及业务语义对齐。
 *
 * @author jeesharp
 * @since 2026-06-27
 */
@Getter
@AllArgsConstructor
public enum ContentSceneEnum {

    COMMENT("COMMENT", "评论/评价", 2),
    FEEDBACK("FEEDBACK", "意见反馈", 2),
    PROFILE("PROFILE", "个人资料", 1),
    IM("IM", "即时通信/社交日志", 4);

    private final String code;
    private final String desc;
    /** 微信 msgSecCheck 默认 scene 值 */
    private final int wechatScene;

    public static ContentSceneEnum fromCode(String code) {
        if (code == null) {
            return null;
        }
        for (ContentSceneEnum e : values()) {
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }
}
