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 SetPersonalListEnum {
    /**
     * 设置——人员列表”【控制设置页里的人员数据的信息】-SetPersonalListEnum
     */

    PHOTO(1, "照片"),
    CERT_NO(2, "证件号"),
    PHONE(3, "手机号"),

    ;

    private Integer code;
    private String desc;

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

}
