package com.yeejoin.amos.boot.module.common.api.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author
 * @title: EquipQrcodeColorEnum
 * <pre>
 * @description: TODO
 * </pre>
 * @date 2020/12/12 14:23
 */
@Getter
@AllArgsConstructor
public enum DynamicLabelEnum {

    NAME("name","姓名"),
    CODE("personNumber","员工编码"),
    BIZORGNAME("bizOrgName","所属单位"),
    PERSONTYPE("peopleType","人员类型"),
    TELPHONE("mobilePhone","联系电话"),
    SEX("gender", "性别"),
    CARDTYPE("certificatesType","证件类型"),
    CARDNUM("certificatesNumber","证件号码"),
    GWLX("jobTitle","岗位类型"),
    GWZZ("postQualification","岗位资质"),
    XFGLGW("fireManagementPost","消防管理岗位"),
    GLZH("amosName","关联账户"),
    GWZT("state","岗位状态"),
    DISPDATE("birthdayTime","出生日期");

    private String code;

    private String describe;

    public static DynamicLabelEnum getEnumByKey(String key) {
        DynamicLabelEnum colorEnum = null;
        for (DynamicLabelEnum u : DynamicLabelEnum.values()) {
            if (u.getCode().equals(key)) {
                colorEnum = u;
                break;
            }
        }
        return colorEnum;
    }

}
