package com.yem.wm.bc.common.enums;

import kd.bos.bundle.MultiLangEnumBridge;

/**
 * @author 夜子
 * @ClassName StatusEnum
 * @description: TODO
 * @date 2023年07月19日
 * @version: 1.0
 */
public enum StatusEnum {
    SAVE(new MultiLangEnumBridge("保存", "StatusEnum_1", "yem-yc-common"), "A"),
    SUBMIT(new MultiLangEnumBridge("已提交", "StatusEnum_2", "yem-yc-common"), "B"),
    AUDIT(new MultiLangEnumBridge("已审核", "StatusEnum_3", "yem-yc-common"), "C");

    private MultiLangEnumBridge bridge = null;
    private String value;

    private StatusEnum(MultiLangEnumBridge bridge, String value) {
        this.bridge = bridge;
        this.value = value;
    }

    public String getName() {
        return this.bridge.loadKDString();
    }

    public String getValue() {
        return this.value;
    }

    public static String getName(String value) {
        String name = null;
        for (StatusEnum status : StatusEnum.values()) {
            if (!status.getValue().equals(value))
                continue;
            name = status.getName();
            break;
        }
        return name;
    }
}
