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

import lombok.AllArgsConstructor;

/**
 * @author  林立超
 * @date 2022/6/16 17:09
 * @Description
 */
@AllArgsConstructor
public enum PeopleRegisterEnum {
    UNCONFIRMED(1, "未确认"),

    CONFIRMED(2, "已确认"),

    REJECTED(3, "已驳回"),

    CANCLE(4, "已取消");

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    private String description;

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