package com.iailab.module.model.enums; import lombok.AllArgsConstructor; import lombok.Getter; /** * 调度模型触发方式 * * @author PanZhibao * @Description * @createTime 2024年12月31日 */ @Getter @AllArgsConstructor public enum ScheduleTriggerMethodEnum { EVENT("1", "事件触发"), JOB("2", "定时触发"); private String code; private String desc; public static ScheduleTriggerMethodEnum getEumByCode(String code) { if (code == null) { return null; } for (ScheduleTriggerMethodEnum statusEnum : ScheduleTriggerMethodEnum.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum; } } return null; } }