package com.fs.erp.dto.sdk.df.enums;

import java.util.Objects;

public enum ExpressProductCodeEnum {

    STANDARD("1", "顺丰标快"),
    LAND_STANDARD("2", "顺丰标快（陆运）"),
    PAID_WAITING_FOR_SHIPMENT("204", "陆运微小件"),
    LAND("231", "陆运包裹"),
    PARTIALLY_SHIPPED("208", "特惠专配");

    private final String value;
    private final String description;

    ExpressProductCodeEnum(String value, String description) {
        this.value = value;
        this.description = description;
    }

    public String getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }


     /**
     * 根据状态值获取枚举实例
     *
     * @param value 状态值
     * @return 对应的枚举实例，如果找不到则返回 null
     */
    public static ExpressProductCodeEnum fromValue(String value) {
        for (ExpressProductCodeEnum status : ExpressProductCodeEnum.values()) {
            if (Objects.equals(status.value, value)) {
                return status;
            }
        }
        return null;
    }
}
