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

import cn.hanghui.outapi.platform.common.utils.Preconditions;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum SuccessShowPersonalInfoListEnum {
    /**
     * 成功显示人员信息列表-SuccessShowPersonalInfoListEnum枚举
     */
    PHOTO(1, "照片"),
    CERT_NAME(2, "姓名"),
    CERT_NO(3, "证件号"),
    PHONE(4, "手机号"),

    ;

    private Integer code;
    private String desc;

    public static SuccessShowPersonalInfoListEnum findByCode(Integer code) {
        if (Preconditions.isBlank(code)) {
            return null;
        }
        for (SuccessShowPersonalInfoListEnum enumObject : values()) {
            if (enumObject.code == code.intValue()) {
                return enumObject;
            }
        }
        return null;
    }

}
