package com.qmth.teachcloud.common.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 机构用户中心机构类别
 * @Author: CaoZixuan
 * @Date: 2021-03-27
 */
public enum OrgCenterTypeEnum {
    NETWORK("NETWORK","高校网院"),
    COLLEGE("COLLEGE","高校教务处"),
    UNDERGRADUATE("UNDERGRADUATE","本科招办"),
    POSTGRADUATE("COLLEGE","研究生招办"),
    MINISTRY("MINISTRY","考试院"),
    AOPENG("AOPENG","奥鹏"),
    PARTNER("PARTNER","合作机构"),
    OTHER("OTHER","其他");

    OrgCenterTypeEnum(String typeCode, String typeName) {
        this.typeCode = typeCode;
        this.typeName = typeName;
    }

    private final String typeCode;
    private final String typeName;

    public String getTypeCode() {
        return typeCode;
    }

    public String getTypeName() {
        return typeName;
    }
    public static List<EnumResult> listTypes() {
        List<EnumResult> list = new ArrayList<EnumResult>();
        for (OrgCenterTypeEnum value : OrgCenterTypeEnum.values()) {
            EnumResult result = new EnumResult();
            result.setName(value.name());
            result.setOrdinal(value.ordinal());
            result.setCode(value.getTypeCode());
            result.setDesc(value.getTypeName());
            list.add(result);
        }
        return list;
    }

}
