package com.yuchen.saas.park.api.enums;

import lombok.AllArgsConstructor;

/**
 * @author 肖祥
 * @date 2022/12/01 09:45
 * @Description
 */
@AllArgsConstructor
public enum PersonGroupNameEnum {

    VISIT("20db9e149b7b4e9ea15fba92a685ff3c", "访客人员"),

    VIP("0f148c693f794615994dcb34ed65fbbe", "VIP人员"),

    INSIDER("b0d7a4c2eb184e398c7657e5ca85c7a9", "内部人员"),

    STRANGER("", "陌生人员");


    private String code;

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    private String description;

    public static String getDescByCode(String code) {
        PersonGroupNameEnum[] enumArray = PersonGroupNameEnum.values();
        for (PersonGroupNameEnum e : enumArray) {
            if (e.getCode().equals(code)) {
                return e.getDescription();
            }
        }
        return "";
    }
}
