package cn.hanghui.outapi.platform.tenant.entity.enums;

import cn.hutool.core.util.StrUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author shisl
 * @package cn.hanghui.outapi.platform.tenant.entity.enums
 * @class ManualInParamsEnum
 * @date 2024/7/19 上午10:25
 * @description 手动输入项
 */
@Getter
@AllArgsConstructor
public enum ManualInParamsEnum {
    USERNAME("username", "姓名"),
    IDCARD("idcard", "身份证"),
    PHONE("phone", "手机号"),
    ;

    public static ManualInParamsEnum queryEnumByCode(String code) {
        if (StrUtil.isBlank(code)) {
            return null;
        }
        for (ManualInParamsEnum enumObject : values()) {
            if (enumObject.code.equals(code)) {
                return enumObject;
            }
        }
        return null;
    }

    private String code;
    private String desc;


}
