package com.engine.recruit.enums; import com.engine.recruit.exception.CustomizeRunTimeException; /** * @author:dxfeng * @createTime: 2024/06/13 * @version: 1.0 */ public enum PositionReleaseStatusEnum { /** * 未发布 */ UNPUBLISHED(0, "未发布"), /** * 已发布 */ PUBLISHED(2, "已发布"), /** * 发布失败 */ PUBLISHING_FAILED(3, "发布失败"), /** * 已下架 */ CLOSED(5, "已下架"), ; PositionReleaseStatusEnum(Integer value, String label) { this.value = value; this.label = label; } public static PositionReleaseStatusEnum getEnumByValue(Integer value) { for (PositionReleaseStatusEnum item : PositionReleaseStatusEnum.values()) { if (item.value.equals(value)) { return item; } } throw new CustomizeRunTimeException("不支持的发布状态"); } private Integer value; private String label; public Integer getValue() { return value; } public void setValue(Integer value) { this.value = value; } public String getLabel() { return label; } public void setLabel(String label) { this.label = label; } }