package com.fs.task.enums;

/**
 * 创建审核人类型
 */
public enum CreateAuditUserTypeEnum {

    COMPANY_USER(0, "公司用户"),
    SYSTEM_USER(1, "系统用户");

    private final Integer code;
    private final String desc;

    CreateAuditUserTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static CreateAuditUserTypeEnum of(Integer code) {
        if (code == null) {
            return null;
        }
        for (CreateAuditUserTypeEnum e : values()) {
            if (e.code.equals(code)) {
                return e;
            }
        }
        throw new IllegalArgumentException("未知的创建审核人类型: " + code);
    }
}
