package com.qmth.jkserver.enums;

/**
 * 机考类型
 * @author tianjun
 *
 */
public enum AttachmentType {

    FILE("文件", 0), FOLDER("文件夹", 1),;

    private String name;

    private int id;

    private AttachmentType(String name, int id) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public int getId() {
        return id;
    }

    public static AttachmentType findById(int id) {
        for (AttachmentType status : AttachmentType.values()) {
            if (status.id == id) {
                return status;
            }
        }
        return null;
    }

}
