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

import lombok.AllArgsConstructor;

/**
 * @Author 蔡文强
 * @Date 2023/5/25 15:56
 * @Description 优惠活动类型枚举信息
 */
@AllArgsConstructor
public enum CouponActivityTypeEnum {

    PARKING_COUPON(1, "智慧停车"),
    CHARGE_COUPON(2, "智慧充电"),
    PLATFORM_COUPON(3, "平台通用"),
    ;

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    private String description;

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