package com.ruoyi.system.domain.zb.enums;


/**
 * * Author: brenda
 * * 2025/1/7
 **/
public enum ZbSpecialWorkEnum {

    DUTY("DUTY","值班"),

    SPECIAL_WORK("WORK","专项工作");

    private String code;

    private String value;

    private ZbSpecialWorkEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public static ZbSpecialWorkEnum getByCode(String code) {
        if (code == null || code.trim().length() <= 0) {
            return null;
        }
        for (int i = 0; i < values().length; i++) {
            if (values()[i].code.equals(code)) {
                return values()[i];
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
