package cn.iocoder.yudao.module.bpm.enums.oa;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 工单类型枚举
 *
 * @author 系统
 */
@Getter
@AllArgsConstructor
public enum WorkOrderTypeEnum {

    IT_SUPPORT("it_support", "IT支持"),
    EQUIPMENT_REPAIR("equipment_repair", "设备维修"),
    SYSTEM_ISSUE("system_issue", "系统问题"),
    PERMISSION_REQUEST("permission_request", "权限申请"),
    OTHER("other", "其他");

    /**
     * 类型值
     */
    private final String type;

    /**
     * 类型名称
     */
    private final String name;

    /**
     * 根据类型值获取枚举
     */
    public static WorkOrderTypeEnum getByType(String type) {
        for (WorkOrderTypeEnum typeEnum : values()) {
            if (typeEnum.getType().equals(type)) {
                return typeEnum;
            }
        }
        return null;
    }

} 