package cn.superdesk.uniorder.common.enums;


/**
 * @Description: TODO 统一订单 订单状态 这个定义是不是有错的呢?
 * @Author: linjinyu 补充与修改
 * @CreateDate: 5/21/20 4:58 PM
 * @UpdateUser: linjinyu
 * @UpdateDate: 5/21/20 4:58 PM
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public enum OrderStatus {

	DELETE(-1, "删除"),
	PENDING(0, "待审核"),
	APPROVED(1, "已同意"),
	REJECTED(2, "已拒绝");

	private int    key;
	private String desc;

	OrderStatus(int key, String desc) {
		this.key = key;
		this.desc = desc;
	}


	public int getKey() {
		return key;
	}

	public String getDesc() {
		return desc;
	}

	public static String getOrderTypeDesc(int key) {
		for (OrderStatus c : OrderStatus.values()) {
			if (c.key == key) {
				return c.getDesc();
			}
		}
		return null;
	}
}
