package com.ruoyi.productionPlan.enums; import lombok.Getter; /** *
* 数据方式枚举类 *
* * @author deslrey * @version 1.0 * @since 2026/03/10 10:36 */ @Getter public enum DataSyncTypeEnum { MANUAL(1, "手动"), SCHEDULED(2, "定时"); private final Integer code; private final String desc; DataSyncTypeEnum(Integer code, String desc) { this.code = code; this.desc = desc; } public static DataSyncTypeEnum getByCode(Integer code) { if (code == null) { return null; } for (DataSyncTypeEnum type : DataSyncTypeEnum.values()) { if (type.getCode().equals(code)) { return type; } } return null; } }