package com.hz.pm.api.expert.constant;


import com.hz.pm.api.expert.model.DictFieldInfoDTO;
import com.hz.pm.api.expert.model.TagFieldInfo;
import com.hz.pm.api.meta.model.ExpertRegionInfo;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

/**
 * @author liuxinxin
 * @date 2022/7/27 下午3:34
 * 专家修改信息需要审核的字段
 */
@Getter
@AllArgsConstructor
@SuppressWarnings("all")
public enum ExpertUserInfoSensitiveFieldEnum {

    // 手机号码
    phone_no("phone_no", "手机号码", String.class, UnitType.single),
    // 电子邮箱
    email("email", "电子邮箱", String.class, UnitType.single),
    // 专家层级
    expert_region("expert_region", "专家层级", ExpertRegionInfo.class, UnitType.single),
    // 履职意向
    expert_intention_work_region("expert_intention_work_region", "履职意向", ExpertRegionInfo.class, UnitType.list),
    // 工作单位（单位code和单位法人编号是关联的）
    company("company", "工作单位", String.class, UnitType.single),
    company_uniq_code("company_uniq_code", "工作单位编码", String.class, UnitType.single),
    legal_entity_code("legal_entity_code", "单位法人编号", String.class, UnitType.single),
    // 行政职级
    administrative_rank("administrative_rank", "行政职级", DictFieldInfoDTO.class, UnitType.list),
    // 职称级别
    title_level("title_level", "职称级别", DictFieldInfoDTO.class, UnitType.list),
    // 擅长方向
    good_at("good_at", "擅长方向", TagFieldInfo.class, UnitType.list),
    // 技术专长
    technical_expertise("technical_expertise", "技术专长", TagFieldInfo.class, UnitType.list),
    // 行业领域
    industry_sector("industry_sector", "行业领域", TagFieldInfo.class, UnitType.list),
    // 其他标签
    other("other", "其他标签", TagFieldInfo.class, UnitType.list);

    private final String key;
    private final String value;
    private final Class<?> aClass;
    private final UnitType type;

    public static List<String> getSensitiveDictionaryList() {
        return Arrays.asList(administrative_rank.name(), title_level.name());
    }

    @AllArgsConstructor
    public enum UnitType {
        /**
         * 单个
         */
        single,

        /**
         * list
         */
        list;
    }

}
