package com.njcn.rdms.module.system.enums.dept;

import java.util.Arrays;

/**
 * 岗位类型枚举
 */
public enum PostTypeEnum {

    MANAGEMENT("management"),
    TECHNICAL("technical"),
    BUSINESS("business");

    private final String type;

    PostTypeEnum(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public static boolean isValid(String type) {
        return Arrays.stream(values()).anyMatch(item -> item.type.equals(type));
    }

}
