package com.xunhong.erp.turbo.api.biz.exception;

import com.xunhong.erp.turbo.base.exception.ErrorCode;

/**
 * 业务异常
 */
public enum BizErrorCode implements ErrorCode {

	/**
	 * 采购单状态不是待审核, 不能操作
	 */
	B_BIZ_PURCHASE_ORDER_NOT_WAITING_AUDIT("B_BIZ_PURCHASE_ORDER_NOT_WAITING_AUDIT", "采购单状态不是待审核, 不能操作"),

	/**
	 * 采购单状态不是草稿, 不能提交审核
	 */
	B_BIZ_PURCHASE_ORDER_NOT_DRAFT("B_BIZ_PURCHASE_ORDER_NOT_DRAFT", "采购单状态不是草稿, 不能提交审核"),

	/**
	 * 采购单状态不是待审核, 不能撤回审核
	 */
	B_BIZ_PURCHASE_ORDER_NOT_WAITING_FOR_WITHDRAW("B_BIZ_PURCHASE_ORDER_NOT_WAITING_FOR_WITHDRAW", "采购单状态不是待审核, 不能撤回审核"),

	/**
	 * 采购单状态不是待老板审核, 不能进行最终审核
	 */
	B_BIZ_PURCHASE_ORDER_NOT_WAITING_FOR_FINAL_APPROVE("B_BIZ_PURCHASE_ORDER_NOT_WAITING_FOR_FINAL_APPROVE", "采购单状态不是待老板审核, 不能进行最终审核"),

	/**
	 * 采购单状态不是待老板审核, 不能驳回最终审核
	 */
	B_BIZ_PURCHASE_ORDER_NOT_WAITING_FOR_REJECT_FINAL("B_BIZ_PURCHASE_ORDER_NOT_WAITING_FOR_REJECT_FINAL", "采购单状态不是待老板审核, 不能驳回最终审核"),

	/**
	 * 采购单不存在
	 */
	B_BIZ_PURCHASE_ORDER_NOT_FOUND("B_BIZ_PURCHASE_ORDER_NOT_FOUND", "采购单不存在"),

	/**
	 * 审核记录不存在
	 */
	B_BIZ_ORDER_AUDIT_NOT_FOUND("B_BIZ_ORDER_AUDIT_NOT_FOUND", "审核记录不存在");
	;


	private final String code;

	private final String message;

	BizErrorCode(String code, String message) {
		this.code = code;
		this.message = message;
	}

	@Override
	public String getCode() {
		return this.code;
	}

	@Override
	public String getMessage() {
		return this.message;
	}
}