package com.ltgk.common.enums;

/**
 * @Author: wan kun
 * @Description: TODO
 * @Date: 2025/1/17 9:42
 * @Version: 1.0
 */
public enum WorkDocumentType {
    // 文件类型 1、合同 2、施工设计文件 3、会议等其他材料
    CONTRACT(1, "合同"),
    CONSTRUCTION_DESIGN_FILE(2, "施工设计文件"),
    MEETING_OTHER_MATERIALS(3, "会议等其他材料");
    private final Integer type;
    private final String name;

    WorkDocumentType(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static WorkDocumentType getWorkDocumentType(Integer type) {
        for (WorkDocumentType workDocumentType : WorkDocumentType.values()) {
            if (workDocumentType.getType().equals(type)) {
                return workDocumentType;
            }
        }
        return null;
    }
}
