package com.m2pool.pool.enums;

/**
 * @Description 工单状态枚举类
 * @Date 2022/5/20 11:15
 * @Author 杜懿
 */
public enum TicketStatusType {
//ps:4是后台人员已回复用户但用户还未读  13是用户已读
    STATUS_NULL(0,""),
    STATUS_ONE(1,"待处理"),
    STATUS_TWO(2,"客服处理中"),
    STATUS_TEN(10,"已完结");

    private final int code;
    private final String status;

    TicketStatusType(int code, String status)
    {
        this.code = code;
        this.status = status;
    }

    public int getCode()
    {
        return code;
    }

    public String getStatus()
    {
        return status;
    }

    public static String getStatusByCode(int code){
        for (TicketStatusType t : TicketStatusType.values()) {
            if(t.getCode()==code){
                return t.getStatus();
            }
        }
        return "";
    }


}
