package com.xisc.pm.infra.enums;

/**
 * 粗切类型
 * @author jun.zeng
 *
 */
public enum CutType {

    M("M","搬送用"),
    D("D","异宽用"),
    P("P","命令用"),
    H("H","热分切用") ;
    
    private final String code;
    private final String desc;

    // 私有构造函数
    CutType(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    // Getter 方法
    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    // 根据code查找枚举项（可选）
    public static CutType getByCode(String code) {
        for (CutType type : CutType.values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }
}
