package com.hotwj.platform.workbench.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 政府端隐患类型枚举
 */
@Getter
@AllArgsConstructor
public enum GovHiddenDangerType {
    // 企业类 (Enterprise)
    BUSINESS_LICENSE("business_license", "营业执照", "enterprise", "企业隐患"),
    ROAD_PERMIT("road_permit", "道路经营许可证", "enterprise", "企业隐患"),
    MANAGER_QUALIFICATION("manager_qualification", "上岗资格证", "enterprise", "企业隐患"),

    // 车辆类 (Vehicle)
    VEHICLE_LICENSE("vehicle_license", "行驶证", "vehicle", "车辆隐患"),
    VEHICLE_TRANSPORT_PERMIT("vehicle_transport_permit", "运输证", "vehicle", "车辆隐患"),
    VEHICLE_ANNUAL_INSPECT("vehicle_annual_inspect", "年审检测", "vehicle", "车辆隐患"),
    VEHICLE_MAINTENANCE("vehicle_maintenance", "二级维护", "vehicle", "车辆隐患"),

    // 人员类 (Personnel)
    DRIVER_ID_CARD("driver_id_card", "驾驶员身份证", "personnel", "人员隐患"),
    DRIVER_LICENSE("driver_license", "驾驶证", "personnel", "人员隐患"),
    DRIVER_QUALIFICATION("driver_qualification", "从业资格证", "personnel", "人员隐患"),
    DRIVER_PRE_JOB_TRAINING("driver_pre_job_training", "岗前教育培训", "personnel", "人员隐患"),
    DRIVER_VIOLATION("driver_violation", "违法违规信息", "personnel", "人员隐患");

    private final String key;
    private final String label;
    private final String groupKey;
    private final String groupLabel;

    public static GovHiddenDangerType getByKey(String key) {
        for (GovHiddenDangerType type : values()) {
            if (type.getKey().equals(key)) {
                return type;
            }
        }
        return null;
    }
}
