package com.njcn.process.enums;

import lombok.Getter;

@Getter
public enum TicketTypeEnum {
    ALARM_TICKET(0, "预/告警单"),
    FEEDBACK(1, "反馈单"),
    TEST_REPORT(2, "测试报告"),
    REVISE_NOTICE(3, "整改通知单"),
    REVISE_FEEDBACK(4, "整改通知反馈单");

    private final Integer code;

    private final String message;

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

    public static TicketTypeEnum getTicketTypeEnumByCode(Integer code) {
        for (TicketTypeEnum ticketTypeEnum : TicketTypeEnum.values()) {
            if (ticketTypeEnum.getCode().equals(code)) {
                return ticketTypeEnum;
            }
        }
        return null;
    }

}
