package com.yami.shop.bean.enums;


/**
 * 店铺钱包金额发生改变的原因
 * 0用户支付 1用户确认收货 2 用户退款申请 3 拒绝用户退款申请 4 提现申请 5 提现申请被拒绝
 *
 * @author LGH
 */
public enum ShopWalletChangeReason {

    /**
     * 用户支付
     */
    PAY(0, "用户支付"),

    /**
     * 用户确认收货
     */
    ORDER_SUCCESS(1, "用户确认收货"),

    /**
     * 用户进行退款
     */
    ORDER_REFUND(2, "用户进行退款"),

    /**
     * 提现申请
     */
    APPLY_CASH(4, "提现申请"),

    /**
     * 提现申请被拒绝
     */
    REFUSE_CASH(5, "提现申请被拒绝"),

    /**
     * 通过提现申请
     */
    PASS_CASH(6, "提现申请通过"),

    /**
     * 系统发放成功
     */
    SUCCESS_CASH(7, "系统发放成功"),
    /**
     * 提现发放失败
     */
    FAIL_CASH(8, "系统发放失败"),

    /**
     * 系统扣除订单中需要颁发给用户的分销金额
     */
    DISTRIBUTION_AMOUNT(9, "扣除订单分销金额");

    private Integer num;

    private String shopWalletChangeReason;

    public Integer value() {
        return num;
    }

    public String getShopWalletChangeReason() {
        return shopWalletChangeReason;
    }

    ShopWalletChangeReason(Integer num, String shopWalletChangeReason) {
        this.num = num;
        this.shopWalletChangeReason = shopWalletChangeReason;
    }

    public static ShopWalletChangeReason instance(Integer value) {
        ShopWalletChangeReason[] enums = values();
        for (ShopWalletChangeReason statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
