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

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 工单跟踪记录操作类型枚举
 *
 * @author 系统
 */
@AllArgsConstructor
@Getter
public enum WorkOrderTrackTypeEnum {

    CREATE("CREATE", "创建工单"),
    ASSIGN("ASSIGN", "分配工单"),
    PROCESS("PROCESS", "处理中"),
    COMPLETE("COMPLETE", "完成工单"),
    CANCEL("CANCEL", "取消工单"),
    COMMENT("COMMENT", "添加备注"),
    TRANSFER("TRANSFER", "转派工单"),
    REOPEN("REOPEN", "重新打开"),
    CLOSE("CLOSE", "关闭工单");

    /**
     * 操作类型
     */
    private final String type;
    
    /**
     * 操作描述
     */
    private final String description;

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

} 