package com.zm.order.tool.server.stream.enums;

import com.zm.order.enums.RefundStatus;
import com.zm.order.tool.server.enums.BizTypeEnum;

/**
 * <p>
 *
 * </p>
 *
 * @author nianchang
 * @date 2023/03/13 3:28 下午
 */
public enum RefundStatusMapping {

    /**
     * 烘焙申请退款
     */
    BAKERY_INIT(BizTypeEnum.BAKING.getType(), 0, RefundStatus.UN_APPROVE.getType()),

    /**
     * 烘焙退款已完成
     */
    BAKERY_REJECT(BizTypeEnum.BAKING.getType(), 1, RefundStatus.COMPLETED.getType()),

    /**
     * 烘焙拒绝退款
     */
    BAKERY_COMPLETED(BizTypeEnum.BAKING.getType(), 2, RefundStatus.REJECT.getType()),

    /**
     * 烘焙退款已取消
     */
    BAKERY_CANCELED(BizTypeEnum.BAKING.getType(), 3, RefundStatus.CANCELED.getType()),

    ;

    /**
     * 业务类型
     *
     * {@link BizTypeEnum}
     */
    private Integer bizType;

    /**
     * 旧枚举值
     */
    private Integer oldCode;

    /**
     * 新枚举值
     */
    private Integer newCode;

    public Integer getBizType() {
        return bizType;
    }

    public Integer getOldCode() {
        return oldCode;
    }

    public Integer getNewCode() {
        return newCode;
    }

    RefundStatusMapping(Integer bizType, Integer oldCode, Integer newCode) {
        this.bizType = bizType;
        this.oldCode = oldCode;
        this.newCode = newCode;
    }
}
