package com.hfkj.sysenum.order;

import lombok.Getter;

import java.util.Objects;

/**
 * 售后类型
 * @className: OrderAfterSalesApplyTypeEnum
 * @author: HuRui
 * @date: 2024/4/15
 **/
@Getter
public enum OrderAfterSalesApplyTypeEnum {

    /**
     * 退款申请
     */
    type1(1, "退款申请"),
    /**
     * 退货申请
     */
    type2(2, "退货申请"),
    ;

    private int code;

    private String name;


    OrderAfterSalesApplyTypeEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static OrderAfterSalesApplyTypeEnum getData(Integer type) {
        for (OrderAfterSalesApplyTypeEnum ele : values()) {
            if(Objects.equals(type,ele.getCode())) return ele;
        }
        return null;
    }
}
