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

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 *  停车卡类型枚举类
 */
@AllArgsConstructor
@Getter
public enum PlaceShareStatusEnum {


    UNPAID_FEE(1, "未生效"),
    NORMAL_USE(2, "生效中"),
    DEFUNCT(3, "已失效"),
    ;

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    private String description;

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