package com.changhu.common.db.enums;

import cn.hutool.core.lang.Dict;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.changhu.common.annotation.IsExtData;
import com.changhu.common.db.BaseEnum;
import com.changhu.common.pojo.vo.SelectNodeVo;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author 20252
 * @createTime 2024/11/5 下午4:22
 * @desc EnterprisesUnitType...
 */
@Getter
@AllArgsConstructor
public enum EnterprisesUnitType implements BaseEnum<String>, IEnum<String> {

    party_government("party_government", "党政机关", "party_government.png"),
    medical("medical", "医疗机构", "medical.png"),
    residential("residential", "小区", "residential.png"),
    higher_learning("higher_learning", "高等院校", "higher_learning.png"),
    primary_and_secondary("primary_and_secondary", "中小学幼儿园", "primary_and_secondary.png"),
    shopping_supermarkets("shopping_supermarkets", "商场超市", "shopping_supermarkets.png"),
    financial("financial", "金融机构", "financial.png"),
    hydropower("hydropower", "水电油气", "hydropower.png"),
    key_projects("key_projects", "重点工程建设单位", "key_projects.png"),
    delivery_logistics("delivery_logistics", "寄递物流", "delivery_logistics.png"),
    military("military", "军工、科研单位", "military.png"),
    wen_bo("wen_bo", "文博单位", "wen_bo.png"),
    important_news("important_news ", "重要新闻单位", "important_news.png"),
    large_scale_material("large_scale_material ", "大型物资储备", "large_scale_material.png"),
    transportation("transportation", "交通运输企业", "transportation.png"),
    industrial_park("industrial_park", "工业园区企业", "industrial_park.png"),
    complex_public_security("complex_public_security", "治安复杂场所", "complex_public_security.png"),
    making_explosive_easily("making_explosive_easily ", "易制爆", "making_explosive_easily.png"),
    hazardous_materials("hazardous_materials ", "危化物品存放场所", "hazardous_materials.png"),
    other("other", "其他单位", "other.png");

    private final String value;
    private final String label;
    @IsExtData
    private final String icon;

    @Override
    public SelectNodeVo<String> serializer() {
        return SelectNodeVo.<String>builder()
                .value(this.getValue())
                .label(this.getLabel())
                .extData(Dict.of("icon", "/resources/icon/gaode/marker/" + this.icon))
                .build();
    }
}
