package com.gkhy.safePlatform.doublePrevention.enums; import com.fasterxml.jackson.annotation.JsonValue; public enum DeviceStatusEnum { DEVICE_USE((byte) 1, "使用中"), DEVICE_DISCARD((byte) 2, "已弃用"), ; byte code; @JsonValue String value; DeviceStatusEnum(byte code, String value) { this.code = code; this.value = value; } public byte getCode() { return code; } public String getValue() { return value; } }