package cn.iocoder.yudao.module.order.enums;

import cn.hutool.core.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum DraweeEnum {

    CONSIGNOR(1, "发货人","shipper"),
    CONSIGNEE(2, "收货人", "consignee"),
    CUSTOM_DRAWEE(3, "自定义付款人","Custom Payer"),
    ;


    private final Integer value;

    private final String name;
    private final String nameEn;



    public static DraweeEnum valueOf(Integer value) {
        return ArrayUtil.firstMatch(drawee-> drawee.getValue().equals(value) , DraweeEnum.values());
    }
}
