package com.njcn.process.enums;

import lombok.Getter;

@Getter
public enum FormworkTypeEnum {
    ALARM_TICKET(0, "预/告警单模板"),
    RECTIFY_TICKET(1, "整改通知反馈单模板");
    private final Integer code;

    private final String message;

    FormworkTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static FormworkTypeEnum getFormworkTypeEnumByCode(Integer code) {
        for (FormworkTypeEnum formworkTypeEnum : FormworkTypeEnum.values()) {
            if (formworkTypeEnum.getCode().equals(code)) {
                return formworkTypeEnum;
            }
        }
        return null;
    }
}
