package com.dcsoft.common.core.enums;

public enum MatterEnum {

    VISIT_WORK("1", "走访办事"),
    BID("2", "参加投标"),
    MEETING("3", "会议交流"),
    OTHER("4", "其他"),
    INTERVIEW("9", "面试预约"),
    ;

    MatterEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getByCode(String code) {
        for (MatterEnum matter : MatterEnum.values()) {
            if (matter.code.equals(code)) {
                return matter.name;
            }
        }
        return null;
    }

    private String code;
    private String name;

    public String getCode() {
        return code;
    }

    public String getValue() {
        return name;
    }
}
