package com.yuchen.saas.park.api.enums;

import lombok.AllArgsConstructor;

/**
 * @author 颜艺波
 * @date 2022/6/16 17:20
 * @Description
 */
@AllArgsConstructor
public enum AcidAssayResultEnum {


    NORESULT(0, "未查询到结果"),
    NEGATIVE(1, "阴性"),
    POSITIVE(2, "阳性"),
    OVERTIME(3, "核酸检测有效期已过"),
    FailResult(4, "查询核酸结果失败");

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    private String description;

    public static String getDescByCode(Integer code) {
        AcidAssayResultEnum[] enumArray = AcidAssayResultEnum.values();
        for (AcidAssayResultEnum e : enumArray) {
            if (e.getCode().equals(code)) {
                return e.getDescription();
            }
        }
        return "";
    }
}
