package thyyxxk.webserver.entity.zhuyuanyisheng.emr;

import lombok.AllArgsConstructor;
import lombok.Getter;


@Getter
@AllArgsConstructor
public enum SignCompleteEnum {

    // 初始化
    INIT(0, "初始化"),
    // 医生发起签名的请求到移动平板上面
    SEND_MORE(1, "医生发起签名的请求到移动平板上面"),
    // 发送请求到了ca的签名流程
    SEND_CA_API(2, "发送请求到了ca的签名流程"),
    // 完成
    COMPLETE(3, "完成签名");

    private final Integer code;
    private final String description;


    // 根据code获取description
    public static String getDescriptionByCode(Integer code) {
        for (SignCompleteEnum signCompleteEnum : SignCompleteEnum.values()) {
            if (signCompleteEnum.getCode().equals(code)) {
                return signCompleteEnum.getDescription();
            }
        }
        return "";
    }
}
